Version Description
- The calendar now supports Dutch. Thanks to Helma Paternostre.
- We are no longer including the thickbox media upload files so the calendar loads faster.
- The calendar now loads JQuery UI drag and drop support from WordPress instead of embedding the code. This allows us to upgrade to the latest version of JQuery UI, avoid some conflicts with other plugins, and load faster.
- Fixed an error with the message panels so they will close properly on Chrome.
Download this release
Release Info
Developer | zgrossbart |
Plugin | Editorial Calendar |
Version | 1.3.3 |
Comparing to | |
See all releases |
Code changes from version 1.3.2 to 1.3.3
- closure.sh +1 -1
- edcal.js +24 -3
- edcal.php +5 -16
- languages/editorial-calendar-nl_NL.mo +0 -0
- languages/editorial-calendar-nl_NL.po +246 -0
- lib/edcallib.min.js +56 -111
- lib/humanmsg.css +5 -1
- lib/humanmsg.js +134 -26
- lib/languages/date-nl-NL.js +104 -0
- lib/lib.txt +0 -7
- lib/ui.core.js +0 -519
- lib/ui.draggable.js +0 -773
- lib/ui.droppable.js +0 -282
- readme.txt +8 -2
closure.sh
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
java -jar closure/compiler.jar --js_output_file lib/edcallib.min.js --js lib/humanmsg.js --js lib/sprintf-0.7-beta1.js --js lib/jquery.cookie.js --js lib/jquery.bgiframe.js --js lib/jquery.delegate.js --js lib/jquery.tools.min.js --js lib/jquery.timepicker.js --js lib/json2.js --js lib/tools.scrollable-1.1.2.js --js lib/tools.scrollable.mousewheel-1.0.1.js --js lib/
|
2 |
|
3 |
java -jar closure/compiler.jar --js_output_file edcal.min.js --js edcal.js
|
1 |
+
java -jar closure/compiler.jar --js_output_file lib/edcallib.min.js --js lib/humanmsg.js --js lib/sprintf-0.7-beta1.js --js lib/jquery.cookie.js --js lib/jquery.bgiframe.js --js lib/jquery.delegate.js --js lib/jquery.tools.min.js --js lib/jquery.timepicker.js --js lib/json2.js --js lib/tools.scrollable-1.1.2.js --js lib/tools.scrollable.mousewheel-1.0.1.js --js lib/date.extras.js
|
2 |
|
3 |
java -jar closure/compiler.jar --js_output_file edcal.min.js --js edcal.js
|
edcal.js
CHANGED
@@ -394,7 +394,8 @@ var edcal = {
|
|
394 |
|
395 |
newrow += '<div class="dayobj">';
|
396 |
|
397 |
-
newrow += '<a href="#" adddate="' + _date.toString('MMMM d') + '" class="daynewlink" title="' +
|
|
|
398 |
'onclick="return false;">' + edcal.str_addPostLink + '</a>';
|
399 |
|
400 |
if (_date.toString('dd') == '01') {
|
@@ -482,12 +483,32 @@ var edcal = {
|
|
482 |
// Step 1. Remove the post from the posts map
|
483 |
edcal.removePostFromMap(parentId, postId);
|
484 |
|
485 |
-
|
486 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
487 |
|
488 |
// Step 3. Add the item to the new DOM parent
|
489 |
jQuery('#' + newDate + ' .postlist').append(edcal.createPostItem(post, newDate));
|
490 |
|
|
|
491 |
if (dayId == newDate) {
|
492 |
/*
|
493 |
If they dropped back on to the day they started with we
|
394 |
|
395 |
newrow += '<div class="dayobj">';
|
396 |
|
397 |
+
newrow += '<a href="#" adddate="' + _date.toString('MMMM d') + '" class="daynewlink" title="' +
|
398 |
+
sprintf(edcal.str_newpost, _date.toString(Date.CultureInfo.formatPatterns.monthDay)) + '" ' +
|
399 |
'onclick="return false;">' + edcal.str_addPostLink + '</a>';
|
400 |
|
401 |
if (_date.toString('dd') == '01') {
|
483 |
// Step 1. Remove the post from the posts map
|
484 |
edcal.removePostFromMap(parentId, postId);
|
485 |
|
486 |
+
/*
|
487 |
+
Step 2. Remove the old element from the old parent.
|
488 |
+
|
489 |
+
We would like to just remove the item right away,
|
490 |
+
but on IE with JQuery UI 1.8 that causes an error
|
491 |
+
because it tries to access the properties of the
|
492 |
+
object to reset the cursor and it can't since the
|
493 |
+
object is not longer part of the DOM. That is why
|
494 |
+
we detach it instead of removing it.
|
495 |
+
|
496 |
+
However, this causes a small memory leak since every
|
497 |
+
drag will detach an element and never remove it. To
|
498 |
+
clean up we wait half a second until the drag is done
|
499 |
+
and then remove the item. Hacky, but it works.
|
500 |
+
*/
|
501 |
+
var oldPost = jQuery('#' + postId);
|
502 |
+
oldPost.detach();
|
503 |
+
|
504 |
+
setTimeout(function() {
|
505 |
+
oldPost.remove();
|
506 |
+
}, 500);
|
507 |
|
508 |
// Step 3. Add the item to the new DOM parent
|
509 |
jQuery('#' + newDate + ' .postlist').append(edcal.createPostItem(post, newDate));
|
510 |
|
511 |
+
|
512 |
if (dayId == newDate) {
|
513 |
/*
|
514 |
If they dropped back on to the day they started with we
|
edcal.php
CHANGED
@@ -18,7 +18,7 @@
|
|
18 |
/*
|
19 |
Plugin Name: WordPress Editorial Calendar
|
20 |
Description: The Editorial Calendar makes it possible to see all your posts and drag and drop them to manage your blog.
|
21 |
-
Version: 1.3.
|
22 |
Author: Colin Vernon, Justin Evans, Mary Vogt, and Zack Grossbart
|
23 |
Author URI: http://www.zackgrossbart.com
|
24 |
Plugin URI: http://stresslimitdesign.com/editorial-calendar-plugin
|
@@ -244,7 +244,7 @@ function edcal_list_admin() {
|
|
244 |
edcal.str_cancel = <?php echo(edcal_json_encode(__('Cancel', 'editorial-calendar'))) ?>;
|
245 |
edcal.str_posttitle = <?php echo(edcal_json_encode(__('Title', 'editorial-calendar'))) ?>;
|
246 |
edcal.str_postcontent = <?php echo(edcal_json_encode(__('Content', 'editorial-calendar'))) ?>;
|
247 |
-
edcal.str_newpost = <?php echo(edcal_json_encode(__('Add a new post on ', 'editorial-calendar'))) ?>;
|
248 |
edcal.str_newpost_title = <?php echo(edcal_json_encode(sprintf(__('New %s - ', 'editorial-calendar'), edcal_get_posttype_singlename()))) ?> ;
|
249 |
edcal.str_update = <?php echo(edcal_json_encode(__('Update', 'editorial-calendar'))) ?>;
|
250 |
edcal.str_publish = <?php echo(edcal_json_encode(__('Schedule', 'editorial-calendar'))) ?>;
|
@@ -448,21 +448,15 @@ function edcal_filter_where($where = '') {
|
|
448 |
*
|
449 |
*/
|
450 |
function edcal_scripts() {
|
451 |
-
if ( user_can_richedit() )
|
452 |
-
wp_enqueue_script('editor');
|
453 |
-
add_thickbox();
|
454 |
-
?>
|
455 |
-
<link rel='stylesheet' id='thickbox-css' href='<?php echo(path_join(WP_PLUGIN_URL, basename( dirname( __FILE__ ) )."/../../../wp-includes/js/thickbox/thickbox.css?ver=20090514")); ?>' type='text/css' media='all' />
|
456 |
-
<?php
|
457 |
-
wp_enqueue_script('media-upload');
|
458 |
-
|
459 |
-
|
460 |
/*
|
461 |
* To get proper localization for dates we need to include the correct JavaScript file for the current
|
462 |
* locale. We can do this based on the locale in the localized bundle to make sure the date locale matches
|
463 |
* the locale for the other strings.
|
464 |
*/
|
465 |
wp_enqueue_script( "date", path_join(WP_PLUGIN_URL, basename( dirname( __FILE__ ) )."/lib/languages/date-".__('en-US', 'editorial-calendar').".js"), array( 'jquery' ) );
|
|
|
|
|
|
|
466 |
|
467 |
//wp_enqueue_script( "date-extras", path_join(WP_PLUGIN_URL, basename( dirname( __FILE__ ) )."/lib/date.extras.js"), array( 'jquery' ) );
|
468 |
|
@@ -479,11 +473,6 @@ function edcal_scripts() {
|
|
479 |
* If you're using one of the specific libraries you should comment out the two lines
|
480 |
* above this comment.
|
481 |
*/
|
482 |
-
|
483 |
-
wp_enqueue_script( "ui-core", path_join(WP_PLUGIN_URL, basename( dirname( __FILE__ ) )."/lib/ui.core.js"), array( 'jquery' ) );
|
484 |
-
wp_enqueue_script( "ui-draggable", path_join(WP_PLUGIN_URL, basename( dirname( __FILE__ ) )."/lib/ui.draggable.js"), array( 'jquery' ) );
|
485 |
-
wp_enqueue_script( "ui-droppable", path_join(WP_PLUGIN_URL, basename( dirname( __FILE__ ) )."/lib/ui.droppable.js"), array( 'jquery' ) );
|
486 |
-
|
487 |
wp_enqueue_script( "bgiframe", path_join(WP_PLUGIN_URL, basename( dirname( __FILE__ ) )."/lib/jquery.bgiframe.js"), array( 'jquery' ) );
|
488 |
wp_enqueue_script( "humanMsg", path_join(WP_PLUGIN_URL, basename( dirname( __FILE__ ) )."/lib/humanmsg.js"), array( 'jquery' ) );
|
489 |
wp_enqueue_script( "jquery-timepicker", path_join(WP_PLUGIN_URL, basename( dirname( __FILE__ ) )."/lib/jquery.timepicker.js"), array( 'jquery' ) );
|
18 |
/*
|
19 |
Plugin Name: WordPress Editorial Calendar
|
20 |
Description: The Editorial Calendar makes it possible to see all your posts and drag and drop them to manage your blog.
|
21 |
+
Version: 1.3.3
|
22 |
Author: Colin Vernon, Justin Evans, Mary Vogt, and Zack Grossbart
|
23 |
Author URI: http://www.zackgrossbart.com
|
24 |
Plugin URI: http://stresslimitdesign.com/editorial-calendar-plugin
|
244 |
edcal.str_cancel = <?php echo(edcal_json_encode(__('Cancel', 'editorial-calendar'))) ?>;
|
245 |
edcal.str_posttitle = <?php echo(edcal_json_encode(__('Title', 'editorial-calendar'))) ?>;
|
246 |
edcal.str_postcontent = <?php echo(edcal_json_encode(__('Content', 'editorial-calendar'))) ?>;
|
247 |
+
edcal.str_newpost = <?php echo(edcal_json_encode(__('Add a new post on %s', 'editorial-calendar'))) ?>;
|
248 |
edcal.str_newpost_title = <?php echo(edcal_json_encode(sprintf(__('New %s - ', 'editorial-calendar'), edcal_get_posttype_singlename()))) ?> ;
|
249 |
edcal.str_update = <?php echo(edcal_json_encode(__('Update', 'editorial-calendar'))) ?>;
|
250 |
edcal.str_publish = <?php echo(edcal_json_encode(__('Schedule', 'editorial-calendar'))) ?>;
|
448 |
*
|
449 |
*/
|
450 |
function edcal_scripts() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
451 |
/*
|
452 |
* To get proper localization for dates we need to include the correct JavaScript file for the current
|
453 |
* locale. We can do this based on the locale in the localized bundle to make sure the date locale matches
|
454 |
* the locale for the other strings.
|
455 |
*/
|
456 |
wp_enqueue_script( "date", path_join(WP_PLUGIN_URL, basename( dirname( __FILE__ ) )."/lib/languages/date-".__('en-US', 'editorial-calendar').".js"), array( 'jquery' ) );
|
457 |
+
wp_enqueue_script( 'jquery' );
|
458 |
+
wp_enqueue_script( 'jquery-ui-draggable' );
|
459 |
+
wp_enqueue_script( 'jquery-ui-droppable' );
|
460 |
|
461 |
//wp_enqueue_script( "date-extras", path_join(WP_PLUGIN_URL, basename( dirname( __FILE__ ) )."/lib/date.extras.js"), array( 'jquery' ) );
|
462 |
|
473 |
* If you're using one of the specific libraries you should comment out the two lines
|
474 |
* above this comment.
|
475 |
*/
|
|
|
|
|
|
|
|
|
|
|
476 |
wp_enqueue_script( "bgiframe", path_join(WP_PLUGIN_URL, basename( dirname( __FILE__ ) )."/lib/jquery.bgiframe.js"), array( 'jquery' ) );
|
477 |
wp_enqueue_script( "humanMsg", path_join(WP_PLUGIN_URL, basename( dirname( __FILE__ ) )."/lib/humanmsg.js"), array( 'jquery' ) );
|
478 |
wp_enqueue_script( "jquery-timepicker", path_join(WP_PLUGIN_URL, basename( dirname( __FILE__ ) )."/lib/jquery.timepicker.js"), array( 'jquery' ) );
|
languages/editorial-calendar-nl_NL.mo
ADDED
Binary file
|
languages/editorial-calendar-nl_NL.po
ADDED
@@ -0,0 +1,246 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Copyright (C) 2010
|
2 |
+
# This file is distributed under the same license as the package.
|
3 |
+
msgid ""
|
4 |
+
msgstr ""
|
5 |
+
"Project-Id-Version: EditorialCalendar\n"
|
6 |
+
"Report-Msgid-Bugs-To: http://wordpress.org/tag/editorial-calendar\n"
|
7 |
+
"POT-Creation-Date: 2011-02-01 15:28:07+00:00\n"
|
8 |
+
"MIME-Version: 1.0\n"
|
9 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
+
"Content-Transfer-Encoding: 8bit\n"
|
11 |
+
"PO-Revision-Date: 2011-02-01 15:10-0500\n"
|
12 |
+
"Last-Translator: Zack Grossbart <zack@grossbart.com>\n"
|
13 |
+
"Language-Team: Paternostre <info@paternostre.nl>\n"
|
14 |
+
"X-Poedit-Language: Dutch\n"
|
15 |
+
"X-Poedit-Country: NETHERLANDS\n"
|
16 |
+
|
17 |
+
#: edcal.php:71
|
18 |
+
#: edcal.php:93
|
19 |
+
msgid "Calendar"
|
20 |
+
msgstr "Kalender"
|
21 |
+
|
22 |
+
#: edcal.php:221
|
23 |
+
#: edcal.php:465
|
24 |
+
msgid "en-US"
|
25 |
+
msgstr "nl-NL"
|
26 |
+
|
27 |
+
#: edcal.php:229
|
28 |
+
msgid "%1$s by %2$s"
|
29 |
+
msgstr "%1$s door %2$s"
|
30 |
+
|
31 |
+
#: edcal.php:231
|
32 |
+
msgid "New Post"
|
33 |
+
msgstr "Nieuw bericht"
|
34 |
+
|
35 |
+
#: edcal.php:233
|
36 |
+
msgid " [DRAFT]"
|
37 |
+
msgstr "[ CONCEPT]"
|
38 |
+
|
39 |
+
#: edcal.php:234
|
40 |
+
msgid " [PENDING]"
|
41 |
+
msgstr "[WACHTEND]"
|
42 |
+
|
43 |
+
#: edcal.php:235
|
44 |
+
msgid " [STICKY]"
|
45 |
+
msgstr "[STICKY]"
|
46 |
+
|
47 |
+
#: edcal.php:236
|
48 |
+
msgid " [DRAFT, STICKY]"
|
49 |
+
msgstr "[CONCEPT, STICKY]"
|
50 |
+
|
51 |
+
#: edcal.php:237
|
52 |
+
msgid " [PENDING, STICKY]"
|
53 |
+
msgstr "[WACHTEND, STICKY]"
|
54 |
+
|
55 |
+
#: edcal.php:238
|
56 |
+
#: edcal.php:242
|
57 |
+
msgid "Edit"
|
58 |
+
msgstr "Bewerken"
|
59 |
+
|
60 |
+
#: edcal.php:239
|
61 |
+
msgid "Quick Edit"
|
62 |
+
msgstr "Snel bewerken"
|
63 |
+
|
64 |
+
#: edcal.php:240
|
65 |
+
msgid "Delete"
|
66 |
+
msgstr "Verwijderen"
|
67 |
+
|
68 |
+
#: edcal.php:241
|
69 |
+
msgid "View"
|
70 |
+
msgstr "Bekijken"
|
71 |
+
|
72 |
+
#: edcal.php:243
|
73 |
+
msgid "Status:"
|
74 |
+
msgstr "Status:"
|
75 |
+
|
76 |
+
#: edcal.php:244
|
77 |
+
#: edcal.php:409
|
78 |
+
msgid "Cancel"
|
79 |
+
msgstr "Annuleren"
|
80 |
+
|
81 |
+
#: edcal.php:245
|
82 |
+
#: edcal.php:363
|
83 |
+
msgid "Title"
|
84 |
+
msgstr "Titel"
|
85 |
+
|
86 |
+
#: edcal.php:246
|
87 |
+
#: edcal.php:368
|
88 |
+
msgid "Content"
|
89 |
+
msgstr "Inhoud"
|
90 |
+
|
91 |
+
#: edcal.php:247
|
92 |
+
msgid "Add a new post on %s"
|
93 |
+
msgstr "Voeg een nieuwe bericht toe op %s"
|
94 |
+
|
95 |
+
#: edcal.php:248
|
96 |
+
msgid "New %s - "
|
97 |
+
msgstr "Nieuwe %s - "
|
98 |
+
|
99 |
+
#: edcal.php:249
|
100 |
+
msgid "Update"
|
101 |
+
msgstr "Bijwerken"
|
102 |
+
|
103 |
+
#: edcal.php:250
|
104 |
+
#: edcal.php:408
|
105 |
+
msgid "Schedule"
|
106 |
+
msgstr "Planning"
|
107 |
+
|
108 |
+
#: edcal.php:251
|
109 |
+
msgid "Submit for Review"
|
110 |
+
msgstr "Inzenden voor review"
|
111 |
+
|
112 |
+
#: edcal.php:252
|
113 |
+
msgid "Save"
|
114 |
+
msgstr "Opslaan"
|
115 |
+
|
116 |
+
#: edcal.php:253
|
117 |
+
msgid "Edit %1$s - %2$s"
|
118 |
+
msgstr "Bewerk %1$s - %2$s"
|
119 |
+
|
120 |
+
#: edcal.php:254
|
121 |
+
#: edcal.php:394
|
122 |
+
msgid "Scheduled"
|
123 |
+
msgstr "Gepland"
|
124 |
+
|
125 |
+
#: edcal.php:256
|
126 |
+
msgid "You are about to delete the post \""
|
127 |
+
msgstr "Je staat op het punt om het bericht te verwijderen \""
|
128 |
+
|
129 |
+
#: edcal.php:257
|
130 |
+
msgid "\". Press Cancel to stop, OK to delete."
|
131 |
+
msgstr "\". Klik op Annuleer om te stoppen of op OK om te verwijderen."
|
132 |
+
|
133 |
+
#: edcal.php:259
|
134 |
+
msgid "Looks like someone else already moved this post."
|
135 |
+
msgstr "Het lijkt erop dat iemand anders dit bericht al verplaatst heeft."
|
136 |
+
|
137 |
+
#: edcal.php:260
|
138 |
+
msgid "You do not have permission to edit posts."
|
139 |
+
msgstr "Je hebt onvoldoende rechten om berichten te mogen bewerken."
|
140 |
+
|
141 |
+
#: edcal.php:261
|
142 |
+
msgid "Invalid checksum for post. This is commonly a cross-site scripting error."
|
143 |
+
msgstr "Ongeldige checksum voor bericht. Dit is gebruikelijk bij een cross-site scripting-fout."
|
144 |
+
|
145 |
+
#: edcal.php:262
|
146 |
+
msgid "There was an error contacting your blog."
|
147 |
+
msgstr "Er is een fout opgetreden bij de verbinding met je blog."
|
148 |
+
|
149 |
+
#: edcal.php:264
|
150 |
+
msgid "Screen Options"
|
151 |
+
msgstr "Schermopties"
|
152 |
+
|
153 |
+
#: edcal.php:265
|
154 |
+
msgid "Colors"
|
155 |
+
msgstr "Kleuren"
|
156 |
+
|
157 |
+
#: edcal.php:266
|
158 |
+
msgid "Drafts: "
|
159 |
+
msgstr "Concepten:"
|
160 |
+
|
161 |
+
#: edcal.php:267
|
162 |
+
msgid "Apply"
|
163 |
+
msgstr "Toepassen"
|
164 |
+
|
165 |
+
#: edcal.php:268
|
166 |
+
msgid "Show on screen"
|
167 |
+
msgstr "Toon op scherm"
|
168 |
+
|
169 |
+
#: edcal.php:269
|
170 |
+
msgid " weeks at a time"
|
171 |
+
msgstr "weken per keer"
|
172 |
+
|
173 |
+
#: edcal.php:270
|
174 |
+
msgid "Show in Calendar Cell"
|
175 |
+
msgstr "Toon in kalendercel"
|
176 |
+
|
177 |
+
#: edcal.php:271
|
178 |
+
msgid "Author"
|
179 |
+
msgstr "Auteur"
|
180 |
+
|
181 |
+
#: edcal.php:272
|
182 |
+
#: edcal.php:388
|
183 |
+
msgid "Status"
|
184 |
+
msgstr "Status"
|
185 |
+
|
186 |
+
#: edcal.php:273
|
187 |
+
msgid "Time of day"
|
188 |
+
msgstr "Tijd van de dag"
|
189 |
+
|
190 |
+
#: edcal.php:274
|
191 |
+
msgid "An error occurred while loading the calendar: "
|
192 |
+
msgstr "Er is een fout opgetreden tijdens het laden van de kalender:"
|
193 |
+
|
194 |
+
#: edcal.php:276
|
195 |
+
msgid "The calendar can only show between 1 and 5 weeks at a time."
|
196 |
+
msgstr "De kalender kan alleen tussen 1 en 5 weken per keer tonen."
|
197 |
+
|
198 |
+
#: edcal.php:277
|
199 |
+
msgid "Select the number of weeks for the calendar to show."
|
200 |
+
msgstr "Selecteer het aantal weken dat de kalender moet tonen."
|
201 |
+
|
202 |
+
#: edcal.php:285
|
203 |
+
msgid "<h2>We're done</h2>We've finished collecting data. Thank you for helping us make the calendar better."
|
204 |
+
msgstr "<h2>We zijn klaar</h2>We zijn klaar met het verzamelen van de data. Dank je wel voor het helpen bij het verbeteren van de kalender."
|
205 |
+
|
206 |
+
#: edcal.php:326
|
207 |
+
msgid " Calendar"
|
208 |
+
msgstr "Kalender"
|
209 |
+
|
210 |
+
#: edcal.php:335
|
211 |
+
msgid "Jump back"
|
212 |
+
msgstr "Ga terug"
|
213 |
+
|
214 |
+
#: edcal.php:337
|
215 |
+
msgid "Skip ahead"
|
216 |
+
msgstr "Ga vooruit"
|
217 |
+
|
218 |
+
#: edcal.php:342
|
219 |
+
msgid "Scroll the calendar and make the today visible"
|
220 |
+
msgstr "Verschuif de kalender en maak vandaag zichtbaar"
|
221 |
+
|
222 |
+
#: edcal.php:342
|
223 |
+
msgid "Show Today"
|
224 |
+
msgstr "Toon vandaag"
|
225 |
+
|
226 |
+
#: edcal.php:354
|
227 |
+
msgid "Edit Post"
|
228 |
+
msgstr "Bericht bewerken"
|
229 |
+
|
230 |
+
#: edcal.php:383
|
231 |
+
msgid "Time"
|
232 |
+
msgstr "Tijd"
|
233 |
+
|
234 |
+
#: edcal.php:391
|
235 |
+
msgid "Draft"
|
236 |
+
msgstr "Concept"
|
237 |
+
|
238 |
+
#: edcal.php:392
|
239 |
+
msgid "Pending Review"
|
240 |
+
msgstr "Wachtend op review"
|
241 |
+
|
242 |
+
#: edcal.php:734
|
243 |
+
#: edcal.php:737
|
244 |
+
msgid "Error in deleting..."
|
245 |
+
msgstr "Fout bij het verwijderen..."
|
246 |
+
|
lib/edcallib.min.js
CHANGED
@@ -1,113 +1,58 @@
|
|
1 |
-
var humanMsg={setup:function(
|
2 |
-
jQuery("#"
|
3 |
-
|
4 |
-
k
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
if(g
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
function(
|
17 |
-
|
18 |
-
if(e)return e
|
19 |
-
(
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
(
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
{"":
|
37 |
-
"]
|
38 |
-
|
39 |
-
|
40 |
-
i);
|
41 |
-
|
42 |
-
|
43 |
-
function(
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
!f.length?a(document):f}});a.extend(a.expr[":"],{data:function(f,h,k){return!!a.data(f,k[3])},focusable:function(f){var h=f.nodeName.toLowerCase(),k=a.attr(f,"tabindex");return(/input|select|textarea|button|object/.test(h)?!f.disabled:"a"==h||"area"==h?f.href||!isNaN(k):!isNaN(k))&&!a(f)["area"==h?"parents":"closest"](":hidden").length},tabbable:function(f){var h=a.attr(f,"tabindex");return(isNaN(h)||h>=0)&&a(f).is(":focusable")}});function l(f,h,k,o){function r(p){p=a[f][h][p]||[];return typeof p==
|
52 |
-
"string"?p.split(/,?\s+/):p}var q=r("getter");if(o.length==1&&typeof o[0]=="string")q=q.concat(r("getterSetter"));return a.inArray(k,q)!=-1}a.widget=function(f,h){var k=f.split(".")[0];f=f.split(".")[1];a.fn[f]=function(o){var r=typeof o=="string",q=Array.prototype.slice.call(arguments,1);if(r&&o.substring(0,1)=="_")return this;if(r&&l(k,f,o,q)){var p=a.data(this[0],f);return p?p[o].apply(p,q):undefined}return this.each(function(){var t=a.data(this,f);!t&&!r&&a.data(this,f,new a[k][f](this,o))._init();
|
53 |
-
t&&r&&a.isFunction(t[o])&&t[o].apply(t,q)})};a[k]=a[k]||{};a[k][f]=function(o,r){var q=this;this.namespace=k;this.widgetName=f;this.widgetEventPrefix=a[k][f].eventPrefix||f;this.widgetBaseClass=k+"-"+f;this.options=a.extend({},a.widget.defaults,a[k][f].defaults,a.metadata&&a.metadata.get(o)[f],r);this.element=a(o).bind("setData."+f,function(p,t,v){if(p.target==o)return q._setData(t,v)}).bind("getData."+f,function(p,t){if(p.target==o)return q._getData(t)}).bind("remove",function(){return q.destroy()})};
|
54 |
-
a[k][f].prototype=a.extend({},a.widget.prototype,h);a[k][f].getterSetter="option"};a.widget.prototype={_init:function(){},destroy:function(){this.element.removeData(this.widgetName).removeClass(this.widgetBaseClass+"-disabled "+this.namespace+"-state-disabled").removeAttr("aria-disabled")},option:function(f,h){var k=f,o=this;if(typeof f=="string"){if(h===undefined)return this._getData(f);k={};k[f]=h}a.each(k,function(r,q){o._setData(r,q)})},_getData:function(f){return this.options[f]},_setData:function(f,
|
55 |
-
h){this.options[f]=h;if(f=="disabled")this.element[h?"addClass":"removeClass"](this.widgetBaseClass+"-disabled "+this.namespace+"-state-disabled").attr("aria-disabled",h)},enable:function(){this._setData("disabled",false)},disable:function(){this._setData("disabled",true)},_trigger:function(f,h,k){var o=this.options[f];f=f==this.widgetEventPrefix?f:this.widgetEventPrefix+f;h=a.Event(h);h.type=f;if(h.originalEvent){f=a.event.props.length;for(var r;f;){r=a.event.props[--f];h[r]=h.originalEvent[r]}}this.element.trigger(h,
|
56 |
-
k);return!(a.isFunction(o)&&o.call(this.element[0],h,k)===false||h.isDefaultPrevented())}};a.widget.defaults={disabled:false};a.ui.mouse={_mouseInit:function(){var f=this;this.element.bind("mousedown."+this.widgetName,function(h){return f._mouseDown(h)}).bind("click."+this.widgetName,function(h){if(f._preventClickEvent){f._preventClickEvent=false;h.stopImmediatePropagation();return false}});if(a.browser.msie){this._mouseUnselectable=this.element.attr("unselectable");this.element.attr("unselectable",
|
57 |
-
"on")}this.started=false},_mouseDestroy:function(){this.element.unbind("."+this.widgetName);a.browser.msie&&this.element.attr("unselectable",this._mouseUnselectable)},_mouseDown:function(f){f.originalEvent=f.originalEvent||{};if(!f.originalEvent.mouseHandled){this._mouseStarted&&this._mouseUp(f);this._mouseDownEvent=f;var h=this,k=f.which==1,o=typeof this.options.cancel=="string"?a(f.target).parents().add(f.target).filter(this.options.cancel).length:false;if(!k||o||!this._mouseCapture(f))return true;
|
58 |
-
this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet)this._mouseDelayTimer=setTimeout(function(){h.mouseDelayMet=true},this.options.delay);if(this._mouseDistanceMet(f)&&this._mouseDelayMet(f)){this._mouseStarted=this._mouseStart(f)!==false;if(!this._mouseStarted){f.preventDefault();return true}}this._mouseMoveDelegate=function(r){return h._mouseMove(r)};this._mouseUpDelegate=function(r){return h._mouseUp(r)};a(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+
|
59 |
-
this.widgetName,this._mouseUpDelegate);a.browser.safari||f.preventDefault();return f.originalEvent.mouseHandled=true}},_mouseMove:function(f){if(a.browser.msie&&!f.button)return this._mouseUp(f);if(this._mouseStarted){this._mouseDrag(f);return f.preventDefault()}if(this._mouseDistanceMet(f)&&this._mouseDelayMet(f))(this._mouseStarted=this._mouseStart(this._mouseDownEvent,f)!==false)?this._mouseDrag(f):this._mouseUp(f);return!this._mouseStarted},_mouseUp:function(f){a(document).unbind("mousemove."+
|
60 |
-
this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;this._preventClickEvent=f.target==this._mouseDownEvent.target;this._mouseStop(f)}return false},_mouseDistanceMet:function(f){return Math.max(Math.abs(this._mouseDownEvent.pageX-f.pageX),Math.abs(this._mouseDownEvent.pageY-f.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},
|
61 |
-
_mouseStop:function(){},_mouseCapture:function(){return true}};a.ui.mouse.defaults={cancel:null,distance:1,delay:0}}(jQuery);(function(a){a.widget("ui.draggable",a.extend({},a.ui.mouse,{_init:function(){if(this.options.helper=="original"&&!/^(?:r|a|f)/.test(this.element.css("position")))this.element[0].style.position="relative";this.options.addClasses&&this.element.addClass("ui-draggable");this.options.disabled&&this.element.addClass("ui-draggable-disabled");this._mouseInit()},destroy:function(){if(this.element.data("draggable")){this.element.removeData("draggable").unbind(".draggable").removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled");
|
62 |
-
this._mouseDestroy()}},_mouseCapture:function(b){var d=this.options;if(this.helper||d.disabled||a(b.target).is(".ui-resizable-handle"))return false;this.handle=this._getHandle(b);if(!this.handle)return false;return true},_mouseStart:function(b){var d=this.options;this.helper=this._createHelper(b);this._cacheHelperProportions();if(a.ui.ddmanager)a.ui.ddmanager.current=this;this._cacheMargins();this.cssPosition=this.helper.css("position");this.scrollParent=this.helper.scrollParent();this.offset=this.element.offset();
|
63 |
-
this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};a.extend(this.offset,{click:{left:b.pageX-this.offset.left,top:b.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this._generatePosition(b);this.originalPageX=b.pageX;this.originalPageY=b.pageY;d.cursorAt&&this._adjustOffsetFromHelper(d.cursorAt);d.containment&&this._setContainment();this._trigger("start",b);this._cacheHelperProportions();a.ui.ddmanager&&
|
64 |
-
!d.dropBehaviour&&a.ui.ddmanager.prepareOffsets(this,b);this.helper.addClass("ui-draggable-dragging");this._mouseDrag(b,true);return true},_mouseDrag:function(b,d){this.position=this._generatePosition(b);this.positionAbs=this._convertPositionTo("absolute");if(!d){d=this._uiHash();this._trigger("drag",b,d);this.position=d.position}if(!this.options.axis||this.options.axis!="y")this.helper[0].style.left=this.position.left+"px";if(!this.options.axis||this.options.axis!="x")this.helper[0].style.top=this.position.top+
|
65 |
-
"px";a.ui.ddmanager&&a.ui.ddmanager.drag(this,b);return false},_mouseStop:function(b){var d=false;if(a.ui.ddmanager&&!this.options.dropBehaviour)d=a.ui.ddmanager.drop(this,b);if(this.dropped){d=this.dropped;this.dropped=false}if(this.options.revert=="invalid"&&!d||this.options.revert=="valid"&&d||this.options.revert===true||a.isFunction(this.options.revert)&&this.options.revert.call(this.element,d)){var c=this;a(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){c._trigger("stop",
|
66 |
-
b);c._clear()})}else{this._trigger("stop",b);this._clear()}return false},_getHandle:function(b){var d=!this.options.handle||!a(this.options.handle,this.element).length?true:false;a(this.options.handle,this.element).find("*").andSelf().each(function(){if(this==b.target)d=true});return d},_createHelper:function(b){var d=this.options;b=a.isFunction(d.helper)?a(d.helper.apply(this.element[0],[b])):d.helper=="clone"?this.element.clone():this.element;b.parents("body").length||b.appendTo(d.appendTo=="parent"?
|
67 |
-
this.element[0].parentNode:d.appendTo);b[0]!=this.element[0]&&!/(fixed|absolute)/.test(b.css("position"))&&b.css("position","absolute");return b},_adjustOffsetFromHelper:function(b){if(b.left!=undefined)this.offset.click.left=b.left+this.margins.left;if(b.right!=undefined)this.offset.click.left=this.helperProportions.width-b.right+this.margins.left;if(b.top!=undefined)this.offset.click.top=b.top+this.margins.top;if(b.bottom!=undefined)this.offset.click.top=this.helperProportions.height-b.bottom+this.margins.top},
|
68 |
-
_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var b=this.offsetParent.offset();if(this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0])){b.left+=this.scrollParent.scrollLeft();b.top+=this.scrollParent.scrollTop()}if(this.offsetParent[0]==document.body||this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&a.browser.msie)b={top:0,left:0};return{top:b.top+(parseInt(this.offsetParent.css("borderTopWidth"),
|
69 |
-
10)||0),left:b.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var b=this.element.position();return{top:b.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:b.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}else return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),
|
70 |
-
10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var b=this.options;if(b.containment=="parent")b.containment=this.helper[0].parentNode;if(b.containment=="document"||b.containment=="window")this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,a(b.containment=="document"?document:window).width()-this.helperProportions.width-
|
71 |
-
this.margins.left,(a(b.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];if(!/^(document|window|parent)jQuery/.test(b.containment)&&b.containment.constructor!=Array){var d=a(b.containment)[0];if(d){b=a(b.containment).offset();var c=a(d).css("overflow")!="hidden";this.containment=[b.left+(parseInt(a(d).css("borderLeftWidth"),10)||0)+(parseInt(a(d).css("paddingLeft"),10)||0)-this.margins.left,b.top+(parseInt(a(d).css("borderTopWidth"),
|
72 |
-
10)||0)+(parseInt(a(d).css("paddingTop"),10)||0)-this.margins.top,b.left+(c?Math.max(d.scrollWidth,d.offsetWidth):d.offsetWidth)-(parseInt(a(d).css("borderLeftWidth"),10)||0)-(parseInt(a(d).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,b.top+(c?Math.max(d.scrollHeight,d.offsetHeight):d.offsetHeight)-(parseInt(a(d).css("borderTopWidth"),10)||0)-(parseInt(a(d).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top]}}else if(b.containment.constructor==
|
73 |
-
Array)this.containment=b.containment},_convertPositionTo:function(b,d){if(!d)d=this.position;b=b=="absolute"?1:-1;var c=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,e=/(html|body)/i.test(c[0].tagName);return{top:d.top+this.offset.relative.top*b+this.offset.parent.top*b-(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():e?0:c.scrollTop())*
|
74 |
-
b),left:d.left+this.offset.relative.left*b+this.offset.parent.left*b-(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():e?0:c.scrollLeft())*b)}},_generatePosition:function(b){var d=this.options,c=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,e=/(html|body)/i.test(c[0].tagName);if(this.cssPosition=="relative"&&!(this.scrollParent[0]!=
|
75 |
-
document&&this.scrollParent[0]!=this.offsetParent[0]))this.offset.relative=this._getRelativeOffset();var g=b.pageX,n=b.pageY;if(this.originalPosition){if(this.containment){if(b.pageX-this.offset.click.left<this.containment[0])g=this.containment[0]+this.offset.click.left;if(b.pageY-this.offset.click.top<this.containment[1])n=this.containment[1]+this.offset.click.top;if(b.pageX-this.offset.click.left>this.containment[2])g=this.containment[2]+this.offset.click.left;if(b.pageY-this.offset.click.top>this.containment[3])n=
|
76 |
-
this.containment[3]+this.offset.click.top}if(d.grid){n=this.originalPageY+Math.round((n-this.originalPageY)/d.grid[1])*d.grid[1];n=this.containment?!(n-this.offset.click.top<this.containment[1]||n-this.offset.click.top>this.containment[3])?n:!(n-this.offset.click.top<this.containment[1])?n-d.grid[1]:n+d.grid[1]:n;g=this.originalPageX+Math.round((g-this.originalPageX)/d.grid[0])*d.grid[0];g=this.containment?!(g-this.offset.click.left<this.containment[0]||g-this.offset.click.left>this.containment[2])?
|
77 |
-
g:!(g-this.offset.click.left<this.containment[0])?g-d.grid[0]:g+d.grid[0]:g}}return{top:n-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(a.browser.safari&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollTop():e?0:c.scrollTop()),left:g-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(a.browser.safari&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():e?0:c.scrollLeft())}},_clear:function(){this.helper.removeClass("ui-draggable-dragging");
|
78 |
-
this.helper[0]!=this.element[0]&&!this.cancelHelperRemoval&&this.helper.remove();this.helper=null;this.cancelHelperRemoval=false},_trigger:function(b,d,c){c=c||this._uiHash();a.ui.plugin.call(this,b,[d,c]);if(b=="drag")this.positionAbs=this._convertPositionTo("absolute");return a.widget.prototype._trigger.call(this,b,d,c)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,absolutePosition:this.positionAbs,offset:this.positionAbs}}}));a.extend(a.ui.draggable,{version:"1.7.2",
|
79 |
-
eventPrefix:"drag",defaults:{addClasses:true,appendTo:"parent",axis:false,cancel:":input,option",connectToSortable:false,containment:false,cursor:"auto",cursorAt:false,delay:0,distance:1,grid:false,handle:false,helper:"original",iframeFix:false,opacity:false,refreshPositions:false,revert:false,revertDuration:500,scope:"default",scroll:true,scrollSensitivity:20,scrollSpeed:20,snap:false,snapMode:"both",snapTolerance:20,stack:false,zIndex:false}});a.ui.plugin.add("draggable","connectToSortable",{start:function(b,
|
80 |
-
d){var c=a(this).data("draggable"),e=c.options,g=a.extend({},d,{item:c.element});c.sortables=[];a(e.connectToSortable).each(function(){var n=a.data(this,"sortable");if(n&&!n.options.disabled){c.sortables.push({instance:n,shouldRevert:n.options.revert});n._refreshItems();n._trigger("activate",b,g)}})},stop:function(b,d){var c=a(this).data("draggable"),e=a.extend({},d,{item:c.element});a.each(c.sortables,function(){if(this.instance.isOver){this.instance.isOver=0;c.cancelHelperRemoval=true;this.instance.cancelHelperRemoval=
|
81 |
-
false;if(this.shouldRevert)this.instance.options.revert=true;this.instance._mouseStop(b);this.instance.options.helper=this.instance.options._helper;c.options.helper=="original"&&this.instance.currentItem.css({top:"auto",left:"auto"})}else{this.instance.cancelHelperRemoval=false;this.instance._trigger("deactivate",b,e)}})},drag:function(b,d){var c=a(this).data("draggable"),e=this;a.each(c.sortables,function(){this.instance.positionAbs=c.positionAbs;this.instance.helperProportions=c.helperProportions;
|
82 |
-
this.instance.offset.click=c.offset.click;if(this.instance._intersectsWith(this.instance.containerCache)){if(!this.instance.isOver){this.instance.isOver=1;this.instance.currentItem=a(e).clone().appendTo(this.instance.element).data("sortable-item",true);this.instance.options._helper=this.instance.options.helper;this.instance.options.helper=function(){return d.helper[0]};b.target=this.instance.currentItem[0];this.instance._mouseCapture(b,true);this.instance._mouseStart(b,true,true);this.instance.offset.click.top=
|
83 |
-
c.offset.click.top;this.instance.offset.click.left=c.offset.click.left;this.instance.offset.parent.left-=c.offset.parent.left-this.instance.offset.parent.left;this.instance.offset.parent.top-=c.offset.parent.top-this.instance.offset.parent.top;c._trigger("toSortable",b);c.dropped=this.instance.element;c.currentItem=c.element;this.instance.fromOutside=c}this.instance.currentItem&&this.instance._mouseDrag(b)}else if(this.instance.isOver){this.instance.isOver=0;this.instance.cancelHelperRemoval=true;
|
84 |
-
this.instance.options.revert=false;this.instance._trigger("out",b,this.instance._uiHash(this.instance));this.instance._mouseStop(b,true);this.instance.options.helper=this.instance.options._helper;this.instance.currentItem.remove();this.instance.placeholder&&this.instance.placeholder.remove();c._trigger("fromSortable",b);c.dropped=false}})}});a.ui.plugin.add("draggable","cursor",{start:function(){var b=a("body"),d=a(this).data("draggable").options;if(b.css("cursor"))d._cursor=b.css("cursor");b.css("cursor",
|
85 |
-
d.cursor)},stop:function(){if(a(this).data("draggable")){var b=a(this).data("draggable").options;b._cursor&&a("body").css("cursor",b._cursor)}}});a.ui.plugin.add("draggable","iframeFix",{start:function(){var b=a(this).data("draggable").options;a(b.iframeFix===true?"iframe":b.iframeFix).each(function(){a('<div class="ui-draggable-iframeFix" style="background: #fff;"></div>').css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1000}).css(a(this).offset()).appendTo("body")})},
|
86 |
-
stop:function(){a("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)})}});a.ui.plugin.add("draggable","opacity",{start:function(b,d){b=a(d.helper);d=a(this).data("draggable").options;if(b.css("opacity"))d._opacity=b.css("opacity");b.css("opacity",d.opacity)},stop:function(b,d){b=a(this).data("draggable").options;b._opacity&&a(d.helper).css("opacity",b._opacity)}});a.ui.plugin.add("draggable","scroll",{start:function(){var b=a(this).data("draggable");if(b.scrollParent[0]!=
|
87 |
-
document&&b.scrollParent[0].tagName!="HTML")b.overflowOffset=b.scrollParent.offset()},drag:function(b){var d=a(this).data("draggable"),c=d.options,e=false;if(d.scrollParent[0]!=document&&d.scrollParent[0].tagName!="HTML"){if(!c.axis||c.axis!="x")if(d.overflowOffset.top+d.scrollParent[0].offsetHeight-b.pageY<c.scrollSensitivity)d.scrollParent[0].scrollTop=e=d.scrollParent[0].scrollTop+c.scrollSpeed;else if(b.pageY-d.overflowOffset.top<c.scrollSensitivity)d.scrollParent[0].scrollTop=e=d.scrollParent[0].scrollTop-
|
88 |
-
c.scrollSpeed;if(!c.axis||c.axis!="y")if(d.overflowOffset.left+d.scrollParent[0].offsetWidth-b.pageX<c.scrollSensitivity)d.scrollParent[0].scrollLeft=e=d.scrollParent[0].scrollLeft+c.scrollSpeed;else if(b.pageX-d.overflowOffset.left<c.scrollSensitivity)d.scrollParent[0].scrollLeft=e=d.scrollParent[0].scrollLeft-c.scrollSpeed}else{if(!c.axis||c.axis!="x")if(b.pageY-a(document).scrollTop()<c.scrollSensitivity)e=a(document).scrollTop(a(document).scrollTop()-c.scrollSpeed);else if(a(window).height()-
|
89 |
-
(b.pageY-a(document).scrollTop())<c.scrollSensitivity)e=a(document).scrollTop(a(document).scrollTop()+c.scrollSpeed);if(!c.axis||c.axis!="y")if(b.pageX-a(document).scrollLeft()<c.scrollSensitivity)e=a(document).scrollLeft(a(document).scrollLeft()-c.scrollSpeed);else if(a(window).width()-(b.pageX-a(document).scrollLeft())<c.scrollSensitivity)e=a(document).scrollLeft(a(document).scrollLeft()+c.scrollSpeed)}e!==false&&a.ui.ddmanager&&!c.dropBehaviour&&a.ui.ddmanager.prepareOffsets(d,b)}});a.ui.plugin.add("draggable",
|
90 |
-
"snap",{start:function(){var b=a(this).data("draggable"),d=b.options;b.snapElements=[];a(d.snap.constructor!=String?d.snap.items||":data(draggable)":d.snap).each(function(){var c=a(this),e=c.offset();this!=b.element[0]&&b.snapElements.push({item:this,width:c.outerWidth(),height:c.outerHeight(),top:e.top,left:e.left})})},drag:function(b,d){for(var c=a(this).data("draggable"),e=c.options,g=e.snapTolerance,n=d.offset.left,m=n+c.helperProportions.width,l=d.offset.top,f=l+c.helperProportions.height,h=
|
91 |
-
c.snapElements.length-1;h>=0;h--){var k=c.snapElements[h].left,o=k+c.snapElements[h].width,r=c.snapElements[h].top,q=r+c.snapElements[h].height;if(k-g<n&&n<o+g&&r-g<l&&l<q+g||k-g<n&&n<o+g&&r-g<f&&f<q+g||k-g<m&&m<o+g&&r-g<l&&l<q+g||k-g<m&&m<o+g&&r-g<f&&f<q+g){if(e.snapMode!="inner"){var p=Math.abs(r-f)<=g,t=Math.abs(q-l)<=g,v=Math.abs(k-m)<=g,i=Math.abs(o-n)<=g;if(p)d.position.top=c._convertPositionTo("relative",{top:r-c.helperProportions.height,left:0}).top-c.margins.top;if(t)d.position.top=c._convertPositionTo("relative",
|
92 |
-
{top:q,left:0}).top-c.margins.top;if(v)d.position.left=c._convertPositionTo("relative",{top:0,left:k-c.helperProportions.width}).left-c.margins.left;if(i)d.position.left=c._convertPositionTo("relative",{top:0,left:o}).left-c.margins.left}var j=p||t||v||i;if(e.snapMode!="outer"){p=Math.abs(r-l)<=g;t=Math.abs(q-f)<=g;v=Math.abs(k-n)<=g;i=Math.abs(o-m)<=g;if(p)d.position.top=c._convertPositionTo("relative",{top:r,left:0}).top-c.margins.top;if(t)d.position.top=c._convertPositionTo("relative",{top:q-c.helperProportions.height,
|
93 |
-
left:0}).top-c.margins.top;if(v)d.position.left=c._convertPositionTo("relative",{top:0,left:k}).left-c.margins.left;if(i)d.position.left=c._convertPositionTo("relative",{top:0,left:o-c.helperProportions.width}).left-c.margins.left}if(!c.snapElements[h].snapping&&(p||t||v||i||j))c.options.snap.snap&&c.options.snap.snap.call(c.element,b,a.extend(c._uiHash(),{snapItem:c.snapElements[h].item}));c.snapElements[h].snapping=p||t||v||i||j}else{c.snapElements[h].snapping&&c.options.snap.release&&c.options.snap.release.call(c.element,
|
94 |
-
b,a.extend(c._uiHash(),{snapItem:c.snapElements[h].item}));c.snapElements[h].snapping=false}}}});a.ui.plugin.add("draggable","stack",{start:function(){var b=a(this).data("draggable").options,d=a.makeArray(a(b.stack.group)).sort(function(c,e){return(parseInt(a(c).css("zIndex"),10)||b.stack.min)-(parseInt(a(e).css("zIndex"),10)||b.stack.min)});a(d).each(function(c){this.style.zIndex=b.stack.min+c});this[0].style.zIndex=b.stack.min+d.length}});a.ui.plugin.add("draggable","zIndex",{start:function(b,d){b=
|
95 |
-
a(d.helper);d=a(this).data("draggable").options;if(b.css("zIndex"))d._zIndex=b.css("zIndex");b.css("zIndex",d.zIndex)},stop:function(b,d){b=a(this).data("draggable").options;b._zIndex&&a(d.helper).css("zIndex",b._zIndex)}})})(jQuery);(function(a){a.widget("ui.droppable",{_init:function(){var b=this.options,d=b.accept;this.isover=0;this.isout=1;this.options.accept=this.options.accept&&a.isFunction(this.options.accept)?this.options.accept:function(c){return c.is(d)};this.proportions={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight};a.ui.ddmanager.droppables[this.options.scope]=a.ui.ddmanager.droppables[this.options.scope]||[];a.ui.ddmanager.droppables[this.options.scope].push(this);this.options.addClasses&&
|
96 |
-
this.element.addClass("ui-droppable")},destroy:function(){for(var b=a.ui.ddmanager.droppables[this.options.scope],d=0;d<b.length;d++)b[d]==this&&b.splice(d,1);this.element.removeClass("ui-droppable ui-droppable-disabled").removeData("droppable").unbind(".droppable")},_setData:function(b,d){if(b=="accept")this.options.accept=d&&a.isFunction(d)?d:function(c){return c.is(d)};else a.widget.prototype._setData.apply(this,arguments)},_activate:function(b){var d=a.ui.ddmanager.current;this.options.activeClass&&
|
97 |
-
this.element.addClass(this.options.activeClass);d&&this._trigger("activate",b,this.ui(d))},_deactivate:function(b){var d=a.ui.ddmanager.current;this.options.activeClass&&this.element.removeClass(this.options.activeClass);d&&this._trigger("deactivate",b,this.ui(d))},_over:function(b){var d=a.ui.ddmanager.current;if(!(!d||(d.currentItem||d.element)[0]==this.element[0]))if(this.options.accept.call(this.element[0],d.currentItem||d.element)){this.options.hoverClass&&this.element.addClass(this.options.hoverClass);
|
98 |
-
this._trigger("over",b,this.ui(d))}},_out:function(b){var d=a.ui.ddmanager.current;if(!(!d||(d.currentItem||d.element)[0]==this.element[0]))if(this.options.accept.call(this.element[0],d.currentItem||d.element)){this.options.hoverClass&&this.element.removeClass(this.options.hoverClass);this._trigger("out",b,this.ui(d))}},_drop:function(b,d){var c=d||a.ui.ddmanager.current;if(!c||(c.currentItem||c.element)[0]==this.element[0])return false;var e=false;this.element.find(":data(droppable)").not(".ui-draggable-dragging").each(function(){var g=
|
99 |
-
a.data(this,"droppable");if(g.options.greedy&&a.ui.intersect(c,a.extend(g,{offset:g.element.offset()}),g.options.tolerance)){e=true;return false}});if(e)return false;if(this.options.accept.call(this.element[0],c.currentItem||c.element)){this.options.activeClass&&this.element.removeClass(this.options.activeClass);this.options.hoverClass&&this.element.removeClass(this.options.hoverClass);this._trigger("drop",b,this.ui(c));return this.element}return false},ui:function(b){return{draggable:b.currentItem||
|
100 |
-
b.element,helper:b.helper,position:b.position,absolutePosition:b.positionAbs,offset:b.positionAbs}}});a.extend(a.ui.droppable,{version:"1.7.2",eventPrefix:"drop",defaults:{accept:"*",activeClass:false,addClasses:true,greedy:false,hoverClass:false,scope:"default",tolerance:"intersect"}});a.ui.intersect=function(b,d,c){if(!d.offset)return false;var e=(b.positionAbs||b.position.absolute).left,g=e+b.helperProportions.width,n=(b.positionAbs||b.position.absolute).top,m=n+b.helperProportions.height,l=d.offset.left,
|
101 |
-
f=l+d.proportions.width,h=d.offset.top,k=h+d.proportions.height;switch(c){case "fit":return l<e&&g<f&&h<n&&m<k;case "intersect":return l<e+b.helperProportions.width/2&&g-b.helperProportions.width/2<f&&h<n+b.helperProportions.height/2&&m-b.helperProportions.height/2<k;case "pointer":c=(b.positionAbs||b.position.absolute).left+(b.clickOffset||b.offset.click).left;b=(b.positionAbs||b.position.absolute).top+(b.clickOffset||b.offset.click).top;return d=a.ui.isOver(b,c,h,l,d.proportions.height,d.proportions.width);
|
102 |
-
case "touch":return(n>=h&&n<=k||m>=h&&m<=k||n<h&&m>k)&&(e>=l&&e<=f||g>=l&&g<=f||e<l&&g>f);default:return false}};a.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(b,d){var c=a.ui.ddmanager.droppables[b.options.scope],e=d?d.type:null,g=(b.currentItem||b.element).find(":data(droppable)").andSelf(),n=0;a:for(;n<c.length;n++)if(!(c[n].options.disabled||b&&!c[n].options.accept.call(c[n].element[0],b.currentItem||b.element))){for(var m=0;m<g.length;m++)if(g[m]==c[n].element[0]){c[n].proportions.height=
|
103 |
-
0;continue a}c[n].visible=c[n].element.css("display")!="none";if(c[n].visible){c[n].offset=c[n].element.offset();c[n].proportions={width:c[n].element[0].offsetWidth,height:c[n].element[0].offsetHeight};e=="mousedown"&&c[n]._activate.call(c[n],d)}}},drop:function(b,d){var c=false;a.each(a.ui.ddmanager.droppables[b.options.scope],function(){if(this.options){if(!this.options.disabled&&this.visible&&a.ui.intersect(b,this,this.options.tolerance))c=this._drop.call(this,d);if(!this.options.disabled&&this.visible&&
|
104 |
-
this.options.accept.call(this.element[0],b.currentItem||b.element)){this.isout=1;this.isover=0;this._deactivate.call(this,d)}}});return c},drag:function(b,d){b.options.refreshPositions&&a.ui.ddmanager.prepareOffsets(b,d);a.each(a.ui.ddmanager.droppables[b.options.scope],function(){if(!(this.options.disabled||this.greedyChild||!this.visible)){var c=a.ui.intersect(b,this,this.options.tolerance);if(c=!c&&this.isover==1?"isout":c&&this.isover==0?"isover":null){var e;if(this.options.greedy){var g=this.element.parents(":data(droppable):eq(0)");
|
105 |
-
if(g.length){e=a.data(g[0],"droppable");e.greedyChild=c=="isover"?1:0}}if(e&&c=="isover"){e.isover=0;e.isout=1;e._out.call(e,d)}this[c]=1;this[c=="isout"?"isover":"isout"]=0;this[c=="isover"?"_over":"_out"].call(this,d);if(e&&c=="isout"){e.isout=0;e.isover=1;e._over.call(e,d)}}}})}}})(jQuery);/*
|
106 |
: Licensed under The MIT License. See license.txt and http://www.datejs.com/license/.
|
107 |
*/
|
108 |
-
(function(){var
|
109 |
-
function
|
110 |
-
3);case "%U":
|
111 |
-
1:0;case "o":case "%G":return
|
112 |
-
1:0;case "O":return
|
113 |
-
100+1);case "%D":return
|
1 |
+
var humanMsg={setup:function(b,k,j){humanMsg.msgID="humanMsg";humanMsg.logID="humanMsgLog";b="body";if(k==undefined)k=humanMsg.logTitle==undefined?"Message Log":humanMsg.logTitle;humanMsg.logTop=jQuery("#"+humanMsg.logID).css("top");humanMsg.msgOpacity=0.9;if(j!=undefined)humanMsg.msgOpacity=parseFloat(j);jQuery(b).prepend('<div id="'+humanMsg.msgID+'" class="humanMsg"><div class="round"></div><p></p><div class="round"></div></div>');jQuery(b).append('<div id="'+humanMsg.logID+'"><p>'+k+'</p><a href="#" id="humanMsgClose">x</a><ul></ul></div>');
|
2 |
+
jQuery("#humanMsgClose").click(function(){jQuery("#"+humanMsg.logID+" p").addClass("minimized");jQuery("#humanMsgClose").hide();return false});jQuery("#"+humanMsg.logID+" p").click(function(){humanMsg.activateLog();if(jQuery("#"+humanMsg.logID+" p").hasClass("minimized")){jQuery("#humanMsgClose").show();jQuery("#"+humanMsg.logID+" p").removeClass("minimized")}else if(jQuery(this).siblings("ul").css("display")!="none"){jQuery("#"+humanMsg.logID).css("top",humanMsg.logTop);jQuery(this).siblings("ul").hide();
|
3 |
+
jQuery("#humanMsgClose").show()}else{humanMsg.setLogHeight();jQuery(this).siblings("ul").slideToggle();jQuery("#humanMsgClose").slideToggle()}})},setLogTitle:function(b){humanMsg.logTitle=b;jQuery("#"+humanMsg.logID+" > p").text(b)},displayMsg:function(b,k){if(b!=""){humanMsg.activateLog();clearTimeout(humanMsg.t2);jQuery("#"+humanMsg.msgID).css("top",jQuery(window).scrollTop()+75+"px");jQuery("#"+humanMsg.msgID+" p").html(b);jQuery("#"+humanMsg.msgID+"").show().animate({opacity:humanMsg.msgOpacity},
|
4 |
+
200,function(){k&&humanMsg.log(b)});humanMsg.t1&&clearTimeout(humanMsg.t1);humanMsg.t2&&clearTimeout(humanMsg.t2);humanMsg.t1=setTimeout(function(){humanMsg.bindEvents()},3000);humanMsg.t2=setTimeout(function(){humanMsg.removeMsg()},5000)}},log:function(b){jQuery("#"+humanMsg.logID).show().children("ul").prepend("<li>"+b+"</li>").children("li:first").slideDown(200);jQuery("#"+humanMsg.logID+" ul").css("display")=="none"?jQuery("#"+humanMsg.logID+" p").animate({bottom:40},200,"linear",function(){jQuery(this).animate({bottom:0},
|
5 |
+
300,"swing",function(){jQuery(this).css({bottom:0})})}):humanMsg.setLogHeight();jQuery("#humanMsgClose").show();jQuery("#"+humanMsg.logID+" p").removeClass("minimized")},activateLog:function(){jQuery("#"+humanMsg.logID+" p").removeClass("faded");clearTimeout(humanMsg.t3);humanMsg.t3=setTimeout(humanMsg.fadeLog,15000)},setLogHeight:function(){if(navigator.appName==="Microsoft Internet Explorer"){var b=Math.min(jQuery("#"+humanMsg.logID+" ul").children("li").length*48,112);jQuery("#"+humanMsg.logID+
|
6 |
+
" ul").css("height",b+10+"px");jQuery("#"+humanMsg.logID).css("top","-"+(b+56+humanMsg.logTop)+"px")}else{b=Math.min(jQuery("#"+humanMsg.logID+" ul").children("li").length*14,56);jQuery("#"+humanMsg.logID+" ul").css("height",b+10+"px");jQuery("#"+humanMsg.logID).css("top","-"+(b+112+humanMsg.logTop)+"px")}},bindEvents:function(){jQuery(window).mousemove(humanMsg.removeMsg).click(humanMsg.removeMsg).keypress(humanMsg.removeMsg)},removeMsg:function(){jQuery(window).unbind("mousemove",humanMsg.removeMsg).unbind("click",
|
7 |
+
humanMsg.removeMsg).unbind("keypress",humanMsg.removeMsg);jQuery("#"+humanMsg.msgID).fadeOut()},fadeLog:function(){jQuery("#"+humanMsg.logID+" ul").css("display")==="none"&&jQuery("#"+humanMsg.logID+" p").addClass("faded")}};jQuery(document).ready(function(){humanMsg.setup()});var sprintf=function(){function b(h){return Object.prototype.toString.call(h).slice(8,-1).toLowerCase()}function k(h,a){for(var c=[];a>0;c[--a]=h);return c.join("")}function j(){j.cache.hasOwnProperty(arguments[0])||(j.cache[arguments[0]]=j.parse(arguments[0]));return j.format.call(null,j.cache[arguments[0]],arguments)}j.format=function(h,a){var c=1,n=h.length,g="",f=[],i,m,l,s;for(i=0;i<n;i++){g=b(h[i]);if(g==="string")f.push(h[i]);else if(g==="array"){l=h[i];if(l[2]){g=a[c];for(m=0;m<l[2].length;m++){if(!g.hasOwnProperty(l[2][m]))throw sprintf('[sprintf] property "%s" does not exist',
|
8 |
+
l[2][m]);g=g[l[2][m]]}}else g=l[1]?a[l[1]]:a[c++];if(/[^s]/.test(l[8])&&b(g)!="number")throw sprintf("[sprintf] expecting number but found %s",b(g));switch(l[8]){case "b":g=g.toString(2);break;case "c":g=String.fromCharCode(g);break;case "d":g=parseInt(g,10);break;case "e":g=l[7]?g.toExponential(l[7]):g.toExponential();break;case "f":g=l[7]?parseFloat(g).toFixed(l[7]):parseFloat(g);break;case "o":g=g.toString(8);break;case "s":g=(g=String(g))&&l[7]?g.substring(0,l[7]):g;break;case "u":g=Math.abs(g);
|
9 |
+
break;case "x":g=g.toString(16);break;case "X":g=g.toString(16).toUpperCase();break}g=/[def]/.test(l[8])&&l[3]&&g>=0?"+"+g:g;m=l[4]?l[4]=="0"?"0":l[4].charAt(1):" ";s=l[6]-String(g).length;m=l[6]?k(m,s):"";f.push(l[5]?g+m:m+g)}}return f.join("")};j.cache={};j.parse=function(h){var a=h;h=[];for(var c=[],n=0;a;){if((h=/^[^\x25]+/.exec(a))!==null)c.push(h[0]);else if((h=/^\x25{2}/.exec(a))!==null)c.push("%");else if((h=/^\x25(?:([1-9]\d*)\$|\(([^\)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-fosuxX])/.exec(a))!==
|
10 |
+
null){if(h[2]){n|=1;var g=[],f=h[2],i=[];if((i=/^([a-z_][a-z_\d]*)/i.exec(f))!==null)for(g.push(i[1]);(f=f.substring(i[0].length))!=="";)if((i=/^\.([a-z_][a-z_\d]*)/i.exec(f))!==null)g.push(i[1]);else if((i=/^\[(\d+)\]/.exec(f))!==null)g.push(i[1]);else throw"[sprintf] huh?";else throw"[sprintf] huh?";h[2]=g}else n|=2;if(n===3)throw"[sprintf] mixing positional and named placeholders is not (yet) supported";c.push(h)}else throw"[sprintf] huh?";a=a.substring(h[0].length)}return c};return j}();
|
11 |
+
function vsprintf(b,k){k.unshift(b);return sprintf.apply(null,k)};jQuery.cookie=function(b,k,j){if(typeof k!="undefined"){j=j||{};if(k===null){k="";j.expires=-1}var h="";if(j.expires&&(typeof j.expires=="number"||j.expires.toUTCString)){if(typeof j.expires=="number"){h=new Date;h.setTime(h.getTime()+j.expires*24*60*60*1000)}else h=j.expires;h="; expires="+h.toUTCString()}var a=j.path?"; path="+j.path:"",c=j.domain?"; domain="+j.domain:"";j=j.secure?"; secure":"";document.cookie=[b,"=",encodeURIComponent(k),h,a,c,j].join("")}else{k=null;if(document.cookie&&document.cookie!=
|
12 |
+
""){j=document.cookie.split(";");for(h=0;h<j.length;h++){a=jQuery.trim(j[h]);if(a.substring(0,b.length+1)==b+"="){k=decodeURIComponent(a.substring(b.length+1));break}}}return k}};(function(b){b.fn.bgIframe=b.fn.bgiframe=function(k){if(b.browser.msie&&parseInt(b.browser.version)<=6){k=b.extend({top:"auto",left:"auto",width:"auto",height:"auto",opacity:true,src:"javascript:false;"},k||{});var j=function(a){return a&&a.constructor==Number?a+"px":a},h='<iframe class="bgiframe"frameborder="0"tabindex="-1"src="'+k.src+'"style="display:block;position:absolute;z-index:-1;'+(k.opacity!==false?"filter:Alpha(Opacity='0');":"")+"top:"+(k.top=="auto"?"expression(((parseInt(this.parentNode.currentStyle.borderTopWidth)||0)*-1)+'px')":
|
13 |
+
j(k.top))+";left:"+(k.left=="auto"?"expression(((parseInt(this.parentNode.currentStyle.borderLeftWidth)||0)*-1)+'px')":j(k.left))+";width:"+(k.width=="auto"?"expression(this.parentNode.offsetWidth+'px')":j(k.width))+";height:"+(k.height=="auto"?"expression(this.parentNode.offsetHeight+'px')":j(k.height))+';"/>';return this.each(function(){b("> iframe.bgiframe",this).length==0&&this.insertBefore(document.createElement(h),this.firstChild)})}return this};if(!b.browser.version)b.browser.version=navigator.userAgent.toLowerCase().match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)[1]})(jQuery);(function(b){b.each({focus:"focusin",blur:"focusout"},function(k,j){b.event.special[j]={setup:function(){if(b.browser.msie)return false;this.addEventListener(k,b.event.special[j].handler,true)},teardown:function(){if(b.browser.msie)return false;this.removeEventListener(k,b.event.special[j].handler,true)},handler:function(h){arguments[0]=b.event.fix(h);arguments[0].type=j;return b.event.handle.apply(this,arguments)}}});b.extend(b.fn,{delegate:function(k,j,h){return this.bind(k,function(a){var c=b(a.target);
|
14 |
+
if(c.is(j))return h.apply(c,arguments)})},triggerEvent:function(k,j){return this.triggerHandler(k,[b.event.fix({type:k,target:j})])}})})(jQuery);(function(b){b.tools=b.tools||{};b.tools.scrollable={version:"1.1.2",conf:{size:5,vertical:false,speed:400,keyboard:true,keyboardSteps:null,disabledClass:"disabled",hoverClass:null,clickable:true,activeClass:"active",easing:"swing",loop:false,items:".items",item:null,prev:".prev",next:".next",prevPage:".prevPage",nextPage:".nextPage",api:false}};var k;function j(h,a){var c=this,n=b(this),g=!a.vertical,f=h.children(),i=0,m;k||(k=c);b.each(a,function(d,e){b.isFunction(e)&&n.bind(d,e)});if(f.length>
|
15 |
+
1)f=b(a.items,h);function l(d){var e=b(d);return a.globalNav?e:h.parent().find(d)}h.data("finder",l);var s=l(a.prev),u=l(a.next),q=l(a.prevPage),p=l(a.nextPage);b.extend(c,{getIndex:function(){return i},getClickIndex:function(){var d=c.getItems();return d.index(d.filter("."+a.activeClass))},getConf:function(){return a},getSize:function(){return c.getItems().size()},getPageAmount:function(){return Math.ceil(this.getSize()/a.size)},getPageIndex:function(){return Math.ceil(i/a.size)},getNaviButtons:function(){return s.add(u).add(q).add(p)},
|
16 |
+
getRoot:function(){return h},getItemWrap:function(){return f},getItems:function(){return f.children(a.item)},getVisibleItems:function(){return c.getItems().slice(i,i+a.size)},seekTo:function(d,e,o){if(d<0)d=0;if(i===d)return c;if(b.isFunction(e))o=e;if(d>c.getSize()-a.size)return a.loop?c.begin():this.end();var t=c.getItems().eq(d);if(!t.length)return c;var v=b.Event("onBeforeSeek");n.trigger(v,[d]);if(v.isDefaultPrevented())return c;if(e===undefined||b.isFunction(e))e=a.speed;function x(){o&&o.call(c,
|
17 |
+
d);n.trigger("onSeek",[d])}g?f.animate({left:-t.position().left},e,a.easing,x):f.animate({top:-t.position().top},e,a.easing,x);k=c;i=d;v=b.Event("onStart");n.trigger(v,[d]);if(v.isDefaultPrevented())return c;s.add(q).toggleClass(a.disabledClass,d===0);u.add(p).toggleClass(a.disabledClass,d>=c.getSize()-a.size);return c},move:function(d,e,o){m=d>0;return this.seekTo(i+d,e,o)},next:function(d,e){return this.move(1,d,e)},prev:function(d,e){return this.move(-1,d,e)},movePage:function(d,e,o){m=d>0;var t=
|
18 |
+
a.size*d,v=i%a.size;if(v>0)t+=d>0?-v:a.size-v;return this.move(t,e,o)},prevPage:function(d,e){return this.movePage(-1,d,e)},nextPage:function(d,e){return this.movePage(1,d,e)},setPage:function(d,e,o){return this.seekTo(d*a.size,e,o)},begin:function(d,e){m=false;return this.seekTo(0,d,e)},end:function(d,e){m=true;var o=this.getSize()-a.size;return o>0?this.seekTo(o,d,e):c},reload:function(){n.trigger("onReload");return c},focus:function(){return k=c},click:function(d){var e=c.getItems().eq(d),o=a.activeClass,
|
19 |
+
t=a.size;if(d<0||d>=c.getSize())return c;if(t==1){if(a.loop)return c.next();if(d===0||d==c.getSize()-1)m=m===undefined?true:!m;return m===false?c.prev():c.next()}if(t==2){d==i&&d--;c.getItems().removeClass(o);e.addClass(o);return c.seekTo(d,time,fn)}if(!e.hasClass(o)){c.getItems().removeClass(o);e.addClass(o);e=Math.floor(t/2);e=d-e;if(e>c.getSize()-t)e=c.getSize()-t;if(e!==d)return c.seekTo(e)}return c},bind:function(d,e){n.bind(d,e);return c},unbind:function(d){n.unbind(d);return c}});b.each("onBeforeSeek,onStart,onSeek,onReload".split(","),
|
20 |
+
function(d,e){c[e]=function(o){return c.bind(e,o)}});s.addClass(a.disabledClass).click(function(){c.prev()});u.click(function(){c.next()});p.click(function(){c.nextPage()});c.getSize()<a.size&&u.add(p).addClass(a.disabledClass);q.addClass(a.disabledClass).click(function(){c.prevPage()});var r=a.hoverClass,w="keydown."+Math.random().toString().substring(10);c.onReload(function(){r&&c.getItems().hover(function(){b(this).addClass(r)},function(){b(this).removeClass(r)});a.clickable&&c.getItems().each(function(d){b(this).unbind("click.scrollable").bind("click.scrollable",
|
21 |
+
function(e){if(!b(e.target).is("a"))return c.click(d)})});a.keyboard?b(document).unbind(w).bind(w,function(d){if(!(d.altKey||d.ctrlKey))if(!(a.keyboard!="static"&&k!=c)){var e=a.keyboardSteps;if(g&&(d.keyCode==37||d.keyCode==39)){c.move(d.keyCode==37?-e:e);return d.preventDefault()}if(!g&&(d.keyCode==38||d.keyCode==40)){c.move(d.keyCode==38?-e:e);return d.preventDefault()}return true}}):b(document).unbind(w)});c.reload()}b.fn.scrollable=function(h){var a=this.eq(typeof h=="number"?h:0).data("scrollable");
|
22 |
+
if(a)return a;var c=b.extend({},b.tools.scrollable.conf);h=b.extend(c,h);h.keyboardSteps=h.keyboardSteps||h.size;this.each(function(){a=new j(b(this),h);b(this).data("scrollable",a)});return h.api?a:this}})(jQuery);
|
23 |
+
(function(b){var k=b.tools.scrollable;k.plugins=k.plugins||{};k.plugins.autoscroll={version:"1.0.1",conf:{autoplay:true,interval:3000,autopause:true,steps:1,api:false}};b.fn.autoscroll=function(j){if(typeof j=="number")j={interval:j};var h=b.extend({},k.plugins.autoscroll.conf),a;b.extend(h,j);this.each(function(){var c=b(this).scrollable();if(c)a=c;var n,g,f=true;c.play=function(){if(!n){f=false;n=setInterval(function(){c.move(h.steps)},h.interval);c.move(h.steps)}};c.pause=function(){n=clearInterval(n)};
|
24 |
+
c.stop=function(){c.pause();f=true};h.autopause&&c.getRoot().add(c.getNaviButtons()).hover(function(){c.pause();clearInterval(g)},function(){f||(g=setTimeout(c.play,h.interval))});h.autoplay&&setTimeout(c.play,h.interval)});return h.api?a:this}})(jQuery);
|
25 |
+
(function(b){var k=b.tools.scrollable;k.plugins=k.plugins||{};k.plugins.navigator={version:"1.0.2",conf:{navi:".navi",naviItem:null,activeClass:"active",indexed:false,api:false,idPrefix:null}};b.fn.navigator=function(j){var h=b.extend({},k.plugins.navigator.conf),a;if(typeof j=="string")j={navi:j};j=b.extend(h,j);this.each(function(){var c=b(this).scrollable(),n=c.getRoot(),g=n.data("finder").call(null,j.navi),f=null,i=c.getNaviButtons();if(c)a=c;c.getNaviButtons=function(){return i.add(g)};function m(){if(!g.children().length||
|
26 |
+
g.data("navi")==c){g.empty();g.data("navi",c);for(var l=0;l<c.getPageAmount();l++)g.append(b("<"+(j.naviItem||"a")+"/>"));f=g.children().each(function(s){var u=b(this);u.click(function(q){c.setPage(s);return q.preventDefault()});j.indexed&&u.text(s);j.idPrefix&&u.attr("id",j.idPrefix+s)})}else{f=j.naviItem?g.find(j.naviItem):g.children();f.each(function(s){var u=b(this);u.click(function(q){c.setPage(s);return q.preventDefault()})})}f.eq(0).addClass(j.activeClass)}c.onStart(function(){var l=j.activeClass;
|
27 |
+
f.removeClass(l).eq(c.getPageIndex()).addClass(l)});c.onReload(function(){m()});m();n=f.filter("[href="+location.hash+"]");n.length&&c.move(f.index(n))});return j.api?a:this}})(jQuery);
|
28 |
+
(function(b){b.fn.wheel=function(a){return this[a?"bind":"trigger"]("wheel",a)};b.event.special.wheel={setup:function(){b.event.add(this,k,j,{})},teardown:function(){b.event.remove(this,k,j)}};var k=!b.browser.mozilla?"mousewheel":"DOMMouseScroll"+(b.browser.version<"1.9"?" mousemove":"");function j(a){switch(a.type){case "mousemove":return b.extend(a.data,{clientX:a.clientX,clientY:a.clientY,pageX:a.pageX,pageY:a.pageY});case "DOMMouseScroll":b.extend(a,a.data);a.delta=-a.detail/3;break;case "mousewheel":a.delta=
|
29 |
+
a.wheelDelta/120;break}a.type="wheel";return b.event.handle.call(this,a,a.delta)}var h=b.tools.scrollable;h.plugins=h.plugins||{};h.plugins.mousewheel={version:"1.0.1",conf:{api:false,speed:50}};b.fn.mousewheel=function(a){var c=b.extend({},h.plugins.mousewheel.conf),n;if(typeof a=="number")a={speed:a};a=b.extend(c,a);this.each(function(){var g=b(this).scrollable();if(g)n=g;g.getRoot().wheel(function(f,i){g.move(i<0?1:-1,a.speed||50);return false})});return a.api?n:this}})(jQuery);(function(b){b.fn.timePicker=function(f){var i=b.extend({},b.fn.timePicker.defaults,f);return this.each(function(){b.timePicker(this,i)})};b.timePicker=function(f,i){f=b(f)[0];return f.timePicker||(f.timePicker=new jQuery._timePicker(f,i))};b._timePicker=function(f,i){var m=false,l=false,s=c(i.startTime,i),u=c(i.endTime,i);b(f).attr("autocomplete","OFF");for(var q=[],p=new Date(s);p<=u;){q[q.length]=j(p,i);p=new Date(p.setMinutes(p.getMinutes()+i.step))}var r=b("<div "+(i.tpDivId?'id="'+i.tpDivId+
|
30 |
+
'" ':"")+'class="time-picker'+(i.show24Hours?"":" time-picker-12hours")+'"></div>'),w=b("<ul></ul>");for(p=0;p<q.length;p++)w.append("<li>"+q[p]+"</li>");r.append(w);q=b(f).offset();r.appendTo("body").css({top:q.top-48+"px",left:q.left,width:b(f).width()+5+"px"}).hide();r.mouseover(function(){m=true}).mouseout(function(){m=false});b("li",w).mouseover(function(){if(!l){b("li.selected",r).removeClass("selected");b(this).addClass("selected")}}).mousedown(function(){m=true}).click(function(){k(f,this,
|
31 |
+
r,i);m=false});function d(){if(r.is(":visible"))return false;b("li",r).removeClass("selected");var e=b(f).offset();r.css({top:e.top-48+"px",left:e.left,width:b(f).width()+5+"px"});r.show();var o=f.value?n(f.value,i):s;e=s.getHours()*60+s.getMinutes();o=o.getHours()*60+o.getMinutes()-e;o=Math.round(o/i.step);e=g(new Date(0,0,0,0,o*i.step+e,0));e=s<e&&e<=u?e:s;e=b("li:contains("+j(e,i)+")",r);if(e.length){e.addClass("selected");r[0].scrollTop=e[0].offsetTop}return true}b(f).focus(d).click(d);b(f).blur(function(){m||
|
32 |
+
r.hide()});q=b.browser.opera||b.browser.mozilla?"keypress":"keydown";b(f)[q](function(e){l=true;var o=r[0].scrollTop;switch(e.keyCode){case 38:if(d())return false;e=b("li.selected",w);var t=e.prev().addClass("selected")[0];if(t){e.removeClass("selected");if(t.offsetTop<o)r[0].scrollTop=o-t.offsetHeight}else{e.removeClass("selected");t=b("li:last",w).addClass("selected")[0];r[0].scrollTop=t.offsetTop-t.offsetHeight}return false;case 40:if(d())return false;e=b("li.selected",w);if(t=e.next().addClass("selected")[0]){e.removeClass("selected");
|
33 |
+
if(t.offsetTop+t.offsetHeight>o+r[0].offsetHeight)r[0].scrollTop=o+t.offsetHeight}else{e.removeClass("selected");b("li:first",w).addClass("selected");r[0].scrollTop=0}return false;case 13:if(r.is(":visible")){o=b("li.selected",w)[0];k(f,o,r,i)}return false;case 27:r.hide();return false}return true});b(f).keyup(function(){l=false});this.getTime=function(){return n(f.value,i)};this.setTime=function(e){f.value=j(g(e),i);b(f).change()}};b.fn.timePicker.defaults={step:30,startTime:new Date(0,0,0,0,0,0),
|
34 |
+
endTime:new Date(0,0,0,23,30,0),separator:":",show24Hours:true};function k(f,i,m){f.value=b(i).text();b(f).change();b.browser.msie||f.focus();m.hide()}function j(f,i){var m=f.getHours(),l=i.show24Hours?m:(m+11)%12+1;l=a(l,i);f=f.getMinutes();return l+i.separator+h(f)+(i.show24Hours?"":m<12?" AM":" PM")}function h(f){return(f<10?"0":"")+f}function a(f,i){return i.show24Hours?(f<10?"0":"")+f:f}function c(f,i){return typeof f=="object"?g(f):n(f,i)}function n(f,i){if(f){var m=f.split(i.separator),l=parseFloat(m[0]);
|
35 |
+
m=parseFloat(m[1]);if(!i.show24Hours)if(l===12&&f.substr("AM")!==-1)l=0;else if(l!==12&&f.indexOf("PM")!==-1)l+=12;f=new Date(0,0,0,l,m,0);return g(f)}return null}function g(f){f.setFullYear(2001);f.setMonth(0);f.setDate(0);return f}})(jQuery);if(!this.JSON)this.JSON={};
|
36 |
+
(function(){function b(i){return i<10?"0"+i:i}if(typeof Date.prototype.toJSON!=="function"){Date.prototype.toJSON=function(){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+b(this.getUTCMonth()+1)+"-"+b(this.getUTCDate())+"T"+b(this.getUTCHours())+":"+b(this.getUTCMinutes())+":"+b(this.getUTCSeconds())+"Z":null};String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(){return this.valueOf()}}var k=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,j=
|
37 |
+
/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,h,a,c={"\u0008":"\\b","\t":"\\t","\n":"\\n","\u000c":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},n;function g(i){j.lastIndex=0;return j.test(i)?'"'+i.replace(j,function(m){var l=c[m];return typeof l==="string"?l:"\\u"+("0000"+m.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+i+'"'}function f(i,m){var l,s,u=h,q,p=m[i];if(p&&typeof p==="object"&&typeof p.toJSON==="function")p=p.toJSON(i);
|
38 |
+
if(typeof n==="function")p=n.call(m,i,p);switch(typeof p){case "string":return g(p);case "number":return isFinite(p)?String(p):"null";case "boolean":case "null":return String(p);case "object":if(!p)return"null";h+=a;q=[];if(Object.prototype.toString.apply(p)==="[object Array]"){s=p.length;for(i=0;i<s;i+=1)q[i]=f(i,p)||"null";m=q.length===0?"[]":h?"[\n"+h+q.join(",\n"+h)+"\n"+u+"]":"["+q.join(",")+"]";h=u;return m}if(n&&typeof n==="object"){s=n.length;for(i=0;i<s;i+=1){l=n[i];if(typeof l==="string")if(m=
|
39 |
+
f(l,p))q.push(g(l)+(h?": ":":")+m)}}else for(l in p)if(Object.hasOwnProperty.call(p,l))if(m=f(l,p))q.push(g(l)+(h?": ":":")+m);m=q.length===0?"{}":h?"{\n"+h+q.join(",\n"+h)+"\n"+u+"}":"{"+q.join(",")+"}";h=u;return m}}if(typeof JSON.stringify!=="function")JSON.stringify=function(i,m,l){var s;a=h="";if(typeof l==="number")for(s=0;s<l;s+=1)a+=" ";else if(typeof l==="string")a=l;if((n=m)&&typeof m!=="function"&&(typeof m!=="object"||typeof m.length!=="number"))throw new Error("JSON.stringify");return f("",
|
40 |
+
{"":i})};if(typeof JSON.parseIt!=="function")JSON.parseIt=function(i,m){function l(s,u){var q,p,r=s[u];if(r&&typeof r==="object")for(q in r)if(Object.hasOwnProperty.call(r,q)){p=l(r,q);if(p!==undefined)r[q]=p;else delete r[q]}return m.call(s,u,r)}k.lastIndex=0;if(k.test(i))i=i.replace(k,function(s){return"\\u"+("0000"+s.charCodeAt(0).toString(16)).slice(-4)});if(/^[\],:{}\s]*$/.test(i.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,
|
41 |
+
"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""))){i=eval("("+i+")");return typeof m==="function"?l({"":i},""):i}throw new SyntaxError("JSON.parseIt");}})();(function(b){b.tools=b.tools||{};b.tools.scrollable={version:"1.1.2",conf:{size:5,vertical:false,speed:400,keyboard:true,keyboardSteps:null,disabledClass:"disabled",hoverClass:null,clickable:true,activeClass:"active",easing:"swing",loop:false,items:".items",item:null,prev:".prev",next:".next",prevPage:".prevPage",nextPage:".nextPage",api:false}};var k;function j(h,a){var c=this,n=b(this),g=!a.vertical,f=h.children(),i=0,m;k||(k=c);b.each(a,function(d,e){b.isFunction(e)&&n.bind(d,e)});if(f.length>
|
42 |
+
1)f=b(a.items,h);function l(d){var e=b(d);return a.globalNav?e:h.parent().find(d)}h.data("finder",l);var s=l(a.prev),u=l(a.next),q=l(a.prevPage),p=l(a.nextPage);b.extend(c,{getIndex:function(){return i},getClickIndex:function(){var d=c.getItems();return d.index(d.filter("."+a.activeClass))},getConf:function(){return a},getSize:function(){return c.getItems().size()},getPageAmount:function(){return Math.ceil(this.getSize()/a.size)},getPageIndex:function(){return Math.ceil(i/a.size)},getNaviButtons:function(){return s.add(u).add(q).add(p)},
|
43 |
+
getRoot:function(){return h},getItemWrap:function(){return f},getItems:function(){return f.children(a.item)},getVisibleItems:function(){return c.getItems().slice(i,i+a.size)},seekTo:function(d,e,o){if(d<0)d=0;if(i===d)return c;if(b.isFunction(e))o=e;if(d>c.getSize()-a.size)return a.loop?c.begin():this.end();var t=c.getItems().eq(d);if(!t.length)return c;var v=b.Event("onBeforeSeek");n.trigger(v,d>i);if(v.isDefaultPrevented())return c;if(e===undefined||b.isFunction(e))e=a.speed;function x(){o&&o.call(c,
|
44 |
+
d);n.trigger("onSeek",[d])}g?f.animate({left:-t.position().left},e,a.easing,x):f.animate({top:-t.position().top},e,a.easing,x);k=c;i=d;v=b.Event("onStart");n.trigger(v,[d]);if(v.isDefaultPrevented())return c;s.add(q).toggleClass(a.disabledClass,d===0);u.add(p).toggleClass(a.disabledClass,d>=c.getSize()-a.size);return c},move:function(d,e,o){m=d>0;return this.seekTo(i+d,e,o)},next:function(d,e){return this.move(1,d,e)},prev:function(d,e){return this.move(-1,d,e)},movePage:function(d,e,o){m=d>0;var t=
|
45 |
+
a.size*d,v=i%a.size;if(v>0)t+=d>0?-v:a.size-v;return this.move(t,e,o)},prevPage:function(d,e){return this.movePage(-1,d,e)},nextPage:function(d,e){return this.movePage(1,d,e)},setPage:function(d,e,o){return this.seekTo(d*a.size,e,o)},begin:function(d,e){m=false;return this.seekTo(0,d,e)},end:function(d,e){m=true;var o=this.getSize()-a.size;return o>0?this.seekTo(o,d,e):c},reload:function(){n.trigger("onReload");return c},focus:function(){return k=c},click:function(d){var e=c.getItems().eq(d),o=a.activeClass,
|
46 |
+
t=a.size;if(d<0||d>=c.getSize())return c;if(t==1){if(a.loop)return c.next();if(d===0||d==c.getSize()-1)m=m===undefined?true:!m;return m===false?c.prev():c.next()}if(t==2){d==i&&d--;c.getItems().removeClass(o);e.addClass(o);return c.seekTo(d,time,fn)}if(!e.hasClass(o)){c.getItems().removeClass(o);e.addClass(o);e=Math.floor(t/2);e=d-e;if(e>c.getSize()-t)e=c.getSize()-t;if(e!==d)return c.seekTo(e)}return c},bind:function(d,e){n.bind(d,e);return c},unbind:function(d){n.unbind(d);return c}});b.each("onBeforeSeek,onStart,onSeek,onReload".split(","),
|
47 |
+
function(d,e){c[e]=function(o){return c.bind(e,o)}});s.addClass(a.disabledClass).click(function(){c.prev()});u.click(function(){c.next()});p.click(function(){c.nextPage()});c.getSize()<a.size&&u.add(p).addClass(a.disabledClass);q.addClass(a.disabledClass).click(function(){c.prevPage()});var r=a.hoverClass,w="keydown."+Math.random().toString().substring(10);c.onReload(function(){r&&c.getItems().hover(function(){b(this).addClass(r)},function(){b(this).removeClass(r)});a.clickable&&c.getItems().each(function(d){b(this).unbind("click.scrollable").bind("click.scrollable",
|
48 |
+
function(e){if(!b(e.target).is("a"))return c.click(d)})});a.keyboard?b(document).unbind(w).bind(w,function(d){if(!(d.altKey||d.ctrlKey))if(!(a.keyboard!="static"&&k!=c)){var e=a.keyboardSteps;if(g&&(d.keyCode==37||d.keyCode==39)){c.move(d.keyCode==37?-e:e);return d.preventDefault()}if(!g&&(d.keyCode==38||d.keyCode==40)){c.move(d.keyCode==38?-e:e);return d.preventDefault()}return true}}):b(document).unbind(w)});c.reload()}b.fn.scrollable=function(h){var a=this.eq(typeof h=="number"?h:0).data("scrollable");
|
49 |
+
if(a)return a;var c=b.extend({},b.tools.scrollable.conf);h=b.extend(c,h);h.keyboardSteps=h.keyboardSteps||h.size;this.each(function(){a=new j(b(this),h);b(this).data("scrollable",a)});return h.api?a:this}})(jQuery);(function(b){b.fn.wheel=function(a){return this[a?"bind":"trigger"]("wheel",a)};b.event.special.wheel={setup:function(){b.event.add(this,k,j,{})},teardown:function(){b.event.remove(this,k,j)}};var k=!b.browser.mozilla?"mousewheel":"DOMMouseScroll"+(b.browser.version<"1.9"?" mousemove":"");function j(a){switch(a.type){case "mousemove":return b.extend(a.data,{clientX:a.clientX,clientY:a.clientY,pageX:a.pageX,pageY:a.pageY});case "DOMMouseScroll":b.extend(a,a.data);a.delta=-a.detail/3;break;case "mousewheel":a.delta=
|
50 |
+
a.wheelDelta/120;break}a.type="wheel";return b.event.handle.call(this,a,a.delta)}var h=b.tools.scrollable;h.plugins=h.plugins||{};h.plugins.mousewheel={version:"1.0.1",conf:{api:false,speed:50}};b.fn.mousewheel=function(a){var c=b.extend({},h.plugins.mousewheel.conf),n;if(typeof a=="number")a={speed:a};a=b.extend(c,a);this.each(function(){var g=b(this).scrollable();if(g)n=g;g.getRoot().wheel(function(f,i){g.move(i<0?1:-1,a.speed||50);return false})});return a.api?n:this}})(jQuery);/*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
51 |
: Licensed under The MIT License. See license.txt and http://www.datejs.com/license/.
|
52 |
*/
|
53 |
+
(function(){var b=Date,k=b.prototype,j=[];function h(a,c){c||(c=2);return("000"+a).slice(c*-1)}b.normalizeFormat=function(a){j=[];(new Date).$format(a);return j.join("")};b.strftime=function(a,c){return(new Date(c*1000)).$format(a)};b.strtotime=function(a){a=b.parse(a);a.addMinutes(a.getTimezoneOffset()*-1);return Math.round(b.UTC(a.getUTCFullYear(),a.getUTCMonth(),a.getUTCDate(),a.getUTCHours(),a.getUTCMinutes(),a.getUTCSeconds(),a.getUTCMilliseconds())/1000)};k.$format=function(a){var c=this,n;
|
54 |
+
function g(f){j.push(f);return c.toString(f)}return a?a.replace(/(%|\\)?.|%%/g,function(f){if(f.charAt(0)==="\\"||f.substring(0,2)==="%%")return f.replace("\\","").replace("%%","%");switch(f){case "d":case "%d":return g("dd");case "D":case "%a":return g("ddd");case "j":case "%e":return g("d");case "l":case "%A":return g("dddd");case "N":case "%u":return c.getDay()+1;case "S":return g("S");case "w":case "%w":return c.getDay();case "z":return c.getOrdinalNumber();case "%j":return h(c.getOrdinalNumber(),
|
55 |
+
3);case "%U":f=c.clone().set({month:0,day:1}).addDays(-1).moveToDayOfWeek(0);var i=c.clone().addDays(1).moveToDayOfWeek(0,-1);return i<f?"00":h((i.getOrdinalNumber()-f.getOrdinalNumber())/7+1);case "W":case "%V":return c.getISOWeek();case "%W":return h(c.getWeek());case "F":case "%B":return g("MMMM");case "m":case "%m":return g("MM");case "M":case "%b":case "%h":return g("MMM");case "n":return g("M");case "t":return b.getDaysInMonth(c.getFullYear(),c.getMonth());case "L":return b.isLeapYear(c.getFullYear())?
|
56 |
+
1:0;case "o":case "%G":return c.setWeek(c.getISOWeek()).toString("yyyy");case "%g":return c.$format("%G").slice(-2);case "Y":case "%Y":return g("yyyy");case "y":case "%y":return g("yy");case "a":case "%p":return g("tt").toLowerCase();case "A":return g("tt").toUpperCase();case "g":case "%I":return g("h");case "G":return g("H");case "h":return g("hh");case "H":case "%H":return g("HH");case "i":case "%M":return g("mm");case "s":case "%S":return g("ss");case "u":return h(c.getMilliseconds(),3);case "I":return c.isDaylightSavingTime()?
|
57 |
+
1:0;case "O":return c.getUTCOffset();case "P":n=c.getUTCOffset();return n.substring(0,n.length-2)+":"+n.substring(n.length-2);case "e":case "T":case "%z":case "%Z":return c.getTimezone();case "Z":return c.getTimezoneOffset()*-60;case "B":f=new Date;return Math.floor((f.getHours()*3600+f.getMinutes()*60+f.getSeconds()+(f.getTimezoneOffset()+60)*60)/86.4);case "c":return c.toISOString().replace(/\"/g,"");case "U":return b.strtotime("now");case "%c":return g("d")+" "+g("t");case "%C":return Math.floor(c.getFullYear()/
|
58 |
+
100+1);case "%D":return g("MM/dd/yy");case "%n":return"\\n";case "%t":return"\\t";case "%r":return g("hh:mm tt");case "%R":return g("H:mm");case "%T":return g("H:mm:ss");case "%x":return g("d");case "%X":return g("t");default:j.push(f);return f}}):this._toString()};if(!k.format)k.format=k.$format})();
|
lib/humanmsg.css
CHANGED
@@ -33,4 +33,8 @@
|
|
33 |
|
34 |
.humanMsg a {
|
35 |
display: none;
|
36 |
-
}
|
|
|
|
|
|
|
|
33 |
|
34 |
.humanMsg a {
|
35 |
display: none;
|
36 |
+
}
|
37 |
+
|
38 |
+
#humanMsgLog {
|
39 |
+
display: none;
|
40 |
+
}
|
lib/humanmsg.js
CHANGED
@@ -5,55 +5,159 @@
|
|
5 |
*/
|
6 |
|
7 |
var humanMsg = {
|
8 |
-
setup: function(appendTo, msgOpacity) {
|
9 |
humanMsg.msgID = 'humanMsg';
|
10 |
humanMsg.logID = 'humanMsgLog';
|
11 |
|
12 |
// appendTo is the element the msg is appended to
|
13 |
-
|
14 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15 |
|
16 |
// Opacity of the message
|
17 |
-
humanMsg.msgOpacity = .
|
18 |
|
19 |
if (msgOpacity != undefined)
|
20 |
humanMsg.msgOpacity = parseFloat(msgOpacity);
|
21 |
|
22 |
// Inject the message structure
|
23 |
-
jQuery(appendTo).
|
24 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
25 |
jQuery('#'+humanMsg.logID+' p').click(
|
26 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
27 |
)
|
28 |
},
|
|
|
|
|
|
|
|
|
|
|
29 |
|
30 |
-
displayMsg: function(msg) {
|
31 |
if (msg == '')
|
32 |
return;
|
|
|
|
|
33 |
|
34 |
-
|
|
|
|
|
|
|
|
|
|
|
35 |
|
36 |
// Inject message
|
37 |
jQuery('#'+humanMsg.msgID+' p').html(msg)
|
38 |
|
39 |
// Show message
|
40 |
jQuery('#'+humanMsg.msgID+'').show().animate({ opacity: humanMsg.msgOpacity}, 200, function() {
|
41 |
-
|
42 |
-
.
|
43 |
-
.children('li:first').slideDown(200) // Slide it down
|
44 |
-
|
45 |
-
if ( jQuery('#'+humanMsg.logID+' ul').css('display') == 'none') {
|
46 |
-
jQuery('#'+humanMsg.logID+' p').animate({ bottom: 40 }, 200, 'linear', function() {
|
47 |
-
jQuery(this).animate({ bottom: 0 }, 300, 'easeOutBounce', function() { jQuery(this).css({ bottom: 0 }) })
|
48 |
-
})
|
49 |
}
|
50 |
|
51 |
-
})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
52 |
|
53 |
// Watch for mouse & keyboard in .5s
|
54 |
-
humanMsg.t1 = setTimeout(
|
55 |
// Remove message after 5s
|
56 |
-
humanMsg.t2 = setTimeout(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
57 |
},
|
58 |
|
59 |
bindEvents: function() {
|
@@ -65,18 +169,22 @@ var humanMsg = {
|
|
65 |
},
|
66 |
|
67 |
removeMsg: function() {
|
68 |
-
|
69 |
jQuery(window)
|
70 |
.unbind('mousemove', humanMsg.removeMsg)
|
71 |
.unbind('click', humanMsg.removeMsg)
|
72 |
.unbind('keypress', humanMsg.removeMsg)
|
73 |
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
|
|
|
|
|
|
|
|
78 |
};
|
79 |
|
80 |
jQuery(document).ready(function(){
|
81 |
humanMsg.setup();
|
82 |
-
})
|
5 |
*/
|
6 |
|
7 |
var humanMsg = {
|
8 |
+
setup: function(appendTo, logName, msgOpacity) {
|
9 |
humanMsg.msgID = 'humanMsg';
|
10 |
humanMsg.logID = 'humanMsgLog';
|
11 |
|
12 |
// appendTo is the element the msg is appended to
|
13 |
+
appendTo = 'body';
|
14 |
+
|
15 |
+
// The text on the Log tab
|
16 |
+
if (logName == undefined) {
|
17 |
+
if (humanMsg.logTitle == undefined) {
|
18 |
+
logName = 'Message Log';
|
19 |
+
} else {
|
20 |
+
logName = humanMsg.logTitle;
|
21 |
+
}
|
22 |
+
}
|
23 |
+
|
24 |
+
humanMsg.logTop = jQuery('#'+humanMsg.logID).css("top");
|
25 |
|
26 |
// Opacity of the message
|
27 |
+
humanMsg.msgOpacity = 0.9;
|
28 |
|
29 |
if (msgOpacity != undefined)
|
30 |
humanMsg.msgOpacity = parseFloat(msgOpacity);
|
31 |
|
32 |
// Inject the message structure
|
33 |
+
jQuery(appendTo).prepend('<div id="'+humanMsg.msgID+'" class="humanMsg"><div class="round"></div><p></p><div class="round"></div></div>');
|
34 |
+
jQuery(appendTo).append('<div id="'+humanMsg.logID+'"><p>'+logName+'</p><a href="#" id="humanMsgClose">x</a><ul></ul></div>');
|
35 |
+
|
36 |
+
jQuery('#humanMsgClose').click(
|
37 |
+
function() {
|
38 |
+
jQuery('#'+humanMsg.logID+' p').addClass('minimized');
|
39 |
+
jQuery('#humanMsgClose').hide();
|
40 |
+
return false;
|
41 |
+
});
|
42 |
+
|
43 |
jQuery('#'+humanMsg.logID+' p').click(
|
44 |
+
function() {
|
45 |
+
humanMsg.activateLog();
|
46 |
+
|
47 |
+
if (jQuery('#'+humanMsg.logID+' p').hasClass('minimized')) {
|
48 |
+
jQuery('#humanMsgClose').show();
|
49 |
+
jQuery('#'+humanMsg.logID+' p').removeClass('minimized');
|
50 |
+
return;
|
51 |
+
} else if (jQuery(this).siblings('ul').css('display') != 'none') {
|
52 |
+
jQuery('#'+humanMsg.logID).css("top", humanMsg.logTop);
|
53 |
+
jQuery(this).siblings('ul').hide();
|
54 |
+
jQuery('#humanMsgClose').show();
|
55 |
+
} else {
|
56 |
+
humanMsg.setLogHeight();
|
57 |
+
jQuery(this).siblings('ul').slideToggle();
|
58 |
+
jQuery('#humanMsgClose').slideToggle();
|
59 |
+
}
|
60 |
+
}
|
61 |
)
|
62 |
},
|
63 |
+
|
64 |
+
setLogTitle: function(/*string*/ title) {
|
65 |
+
humanMsg.logTitle = title;
|
66 |
+
jQuery("#" + humanMsg.logID + " > p").text(title);
|
67 |
+
},
|
68 |
|
69 |
+
displayMsg: function(msg, /*boolean*/doLog) {
|
70 |
if (msg == '')
|
71 |
return;
|
72 |
+
|
73 |
+
humanMsg.activateLog();
|
74 |
|
75 |
+
clearTimeout(humanMsg.t2);
|
76 |
+
|
77 |
+
/*
|
78 |
+
* IE doesn't really support CSS fixed position so we need to set the position manually
|
79 |
+
*/
|
80 |
+
jQuery('#' + humanMsg.msgID).css('top', (jQuery(window).scrollTop() + 75) + 'px');
|
81 |
|
82 |
// Inject message
|
83 |
jQuery('#'+humanMsg.msgID+' p').html(msg)
|
84 |
|
85 |
// Show message
|
86 |
jQuery('#'+humanMsg.msgID+'').show().animate({ opacity: humanMsg.msgOpacity}, 200, function() {
|
87 |
+
if (doLog) {
|
88 |
+
humanMsg.log(msg);
|
|
|
|
|
|
|
|
|
|
|
|
|
89 |
}
|
90 |
|
91 |
+
});
|
92 |
+
|
93 |
+
/*
|
94 |
+
* If we are starting a new message and have an existing
|
95 |
+
* message then we want to restart the timers so the
|
96 |
+
* existing message doesn't get hidden very fast.
|
97 |
+
*/
|
98 |
+
if (humanMsg.t1) {
|
99 |
+
clearTimeout(humanMsg.t1);
|
100 |
+
}
|
101 |
+
|
102 |
+
if (humanMsg.t2) {
|
103 |
+
clearTimeout(humanMsg.t2);
|
104 |
+
}
|
105 |
|
106 |
// Watch for mouse & keyboard in .5s
|
107 |
+
humanMsg.t1 = setTimeout(function() {humanMsg.bindEvents();}, 3000);
|
108 |
// Remove message after 5s
|
109 |
+
humanMsg.t2 = setTimeout(function() {humanMsg.removeMsg();}, 5000);
|
110 |
+
},
|
111 |
+
|
112 |
+
log: function(msg) {
|
113 |
+
jQuery('#'+humanMsg.logID)
|
114 |
+
.show().children('ul').prepend('<li>'+msg+'</li>') // Prepend message to log
|
115 |
+
.children('li:first').slideDown(200) // Slide it down
|
116 |
+
|
117 |
+
if (jQuery('#'+humanMsg.logID+' ul').css('display') == 'none') {
|
118 |
+
jQuery('#'+humanMsg.logID+' p').animate({ bottom: 40 }, 200, 'linear', function() {
|
119 |
+
jQuery(this).animate({ bottom: 0 }, 300, 'swing', function() { jQuery(this).css({ bottom: 0 }) })
|
120 |
+
})
|
121 |
+
} else {
|
122 |
+
humanMsg.setLogHeight();
|
123 |
+
}
|
124 |
+
|
125 |
+
jQuery('#humanMsgClose').show();
|
126 |
+
jQuery('#'+humanMsg.logID+' p').removeClass('minimized');
|
127 |
+
},
|
128 |
+
|
129 |
+
activateLog: function() {
|
130 |
+
jQuery('#'+humanMsg.logID+' p').removeClass("faded");
|
131 |
+
|
132 |
+
clearTimeout(humanMsg.t3);
|
133 |
+
|
134 |
+
//fadeout the error log after 15s
|
135 |
+
humanMsg.t3 = setTimeout(humanMsg.fadeLog, 15000)
|
136 |
+
},
|
137 |
+
|
138 |
+
setLogHeight: function() {
|
139 |
+
/*
|
140 |
+
* When items are added to the log we want to adjust the top of the log (where
|
141 |
+
* the pull tab goes) and the height of the log list dynamically so the log is
|
142 |
+
* always a reasonable size.
|
143 |
+
*/
|
144 |
+
if (navigator.appName === "Microsoft Internet Explorer") {
|
145 |
+
/*
|
146 |
+
* IE just calculates the size of these list items differently thn every
|
147 |
+
* other browser. There isn't a good cross-browser way to set the height,
|
148 |
+
* so we tweak it for IE.
|
149 |
+
*/
|
150 |
+
var height = Math.min(jQuery('#'+humanMsg.logID + ' ul').children('li').length * 48, 112);
|
151 |
+
jQuery('#'+humanMsg.logID + ' ul').css("height", (height + 10) + "px");
|
152 |
+
|
153 |
+
jQuery('#'+humanMsg.logID).css("top", "-" + ((height) + 56 + humanMsg.logTop) + "px");
|
154 |
+
} else {
|
155 |
+
var height = Math.min(jQuery('#'+humanMsg.logID + ' ul').children('li').length * 14, 56);
|
156 |
+
jQuery('#'+humanMsg.logID + ' ul').css("height", (height + 10) + "px");
|
157 |
+
jQuery('#'+humanMsg.logID).css("top", "-" + ((height) + 112 + humanMsg.logTop) + "px");
|
158 |
+
}
|
159 |
+
|
160 |
+
|
161 |
},
|
162 |
|
163 |
bindEvents: function() {
|
169 |
},
|
170 |
|
171 |
removeMsg: function() {
|
172 |
+
// Unbind mouse & keyboard
|
173 |
jQuery(window)
|
174 |
.unbind('mousemove', humanMsg.removeMsg)
|
175 |
.unbind('click', humanMsg.removeMsg)
|
176 |
.unbind('keypress', humanMsg.removeMsg)
|
177 |
|
178 |
+
jQuery('#'+humanMsg.msgID).fadeOut();
|
179 |
+
},
|
180 |
+
|
181 |
+
fadeLog: function() {
|
182 |
+
if(jQuery('#'+humanMsg.logID+' ul').css('display') === "none") {
|
183 |
+
jQuery('#'+humanMsg.logID+' p').addClass("faded");
|
184 |
+
}
|
185 |
+
}
|
186 |
};
|
187 |
|
188 |
jQuery(document).ready(function(){
|
189 |
humanMsg.setup();
|
190 |
+
})
|
lib/languages/date-nl-NL.js
ADDED
@@ -0,0 +1,104 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* Version: 1.0 Alpha-1
|
3 |
+
* Build Date: 13-Nov-2007
|
4 |
+
* Copyright (c) 2006-2007, Coolite Inc. (http://www.coolite.com/). All rights reserved.
|
5 |
+
* License: Licensed under The MIT License. See license.txt and http://www.datejs.com/license/.
|
6 |
+
* Website: http://www.datejs.com/ or http://www.coolite.com/datejs/
|
7 |
+
*/
|
8 |
+
Date.CultureInfo={name:"nl-NL",englishName:"Dutch (Netherlands)",nativeName:"Nederlands (Nederland)",dayNames:["zondag","maandag","dinsdag","woensdag","donderdag","vrijdag","zaterdag"],abbreviatedDayNames:["zo","ma","di","wo","do","vr","za"],shortestDayNames:["zo","ma","di","wo","do","vr","za"],firstLetterDayNames:["z","m","d","w","d","v","z"],monthNames:["januari","februari","maart","april","mei","juni","juli","augustus","september","oktober","november","december"],abbreviatedMonthNames:["jan","feb","mrt","apr","mei","jun","jul","aug","sep","okt","nov","dec"],amDesignator:"",pmDesignator:"",firstDayOfWeek:1,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"d-M-yyyy",longDate:"dddd d MMMM yyyy",shortTime:"H:mm",longTime:"H:mm:ss",fullDateTime:"dddd d MMMM yyyy H:mm:ss",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"dd MMMM",yearMonth:"MMMM yyyy"},regexPatterns:{jan:/^jan(uari)?/i,feb:/^feb(ruari)?/i,mar:/^maart/i,apr:/^apr(il)?/i,may:/^mei/i,jun:/^jun(i)?/i,jul:/^jul(i)?/i,aug:/^aug(ustus)?/i,sep:/^sep(t(ember)?)?/i,oct:/^okt(ober)?/i,nov:/^nov(ember)?/i,dec:/^dec(ember)?/i,sun:/^zondag/i,mon:/^maandag/i,tue:/^dinsdag/i,wed:/^woensdag/i,thu:/^donderdag/i,fri:/^vrijdag/i,sat:/^zaterdag/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\+|after|from)/i,subtract:/^(\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\.?m?\.?|p\.?m?\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\s*(\+|\-)\s*\d\d\d\d?)|gmt)/i,ordinalSuffix:/^\s*(st|nd|rd|th)/i,timeContext:/^\s*(\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}};
|
9 |
+
Date.getMonthNumberFromName=function(name){var n=Date.CultureInfo.monthNames,m=Date.CultureInfo.abbreviatedMonthNames,s=name.toLowerCase();for(var i=0;i<n.length;i++){if(n[i].toLowerCase()==s||m[i].toLowerCase()==s){return i;}}
|
10 |
+
return-1;};Date.getDayNumberFromName=function(name){var n=Date.CultureInfo.dayNames,m=Date.CultureInfo.abbreviatedDayNames,o=Date.CultureInfo.shortestDayNames,s=name.toLowerCase();for(var i=0;i<n.length;i++){if(n[i].toLowerCase()==s||m[i].toLowerCase()==s){return i;}}
|
11 |
+
return-1;};Date.isLeapYear=function(year){return(((year%4===0)&&(year%100!==0))||(year%400===0));};Date.getDaysInMonth=function(year,month){return[31,(Date.isLeapYear(year)?29:28),31,30,31,30,31,31,30,31,30,31][month];};Date.getTimezoneOffset=function(s,dst){return(dst||false)?Date.CultureInfo.abbreviatedTimeZoneDST[s.toUpperCase()]:Date.CultureInfo.abbreviatedTimeZoneStandard[s.toUpperCase()];};Date.getTimezoneAbbreviation=function(offset,dst){var n=(dst||false)?Date.CultureInfo.abbreviatedTimeZoneDST:Date.CultureInfo.abbreviatedTimeZoneStandard,p;for(p in n){if(n[p]===offset){return p;}}
|
12 |
+
return null;};Date.prototype.clone=function(){return new Date(this.getTime());};Date.prototype.compareTo=function(date){if(isNaN(this)){throw new Error(this);}
|
13 |
+
if(date instanceof Date&&!isNaN(date)){return(this>date)?1:(this<date)?-1:0;}else{throw new TypeError(date);}};Date.prototype.equals=function(date){return(this.compareTo(date)===0);};Date.prototype.between=function(start,end){var t=this.getTime();return t>=start.getTime()&&t<=end.getTime();};Date.prototype.addMilliseconds=function(value){this.setMilliseconds(this.getMilliseconds()+value);return this;};Date.prototype.addSeconds=function(value){return this.addMilliseconds(value*1000);};Date.prototype.addMinutes=function(value){return this.addMilliseconds(value*60000);};Date.prototype.addHours=function(value){return this.addMilliseconds(value*3600000);};Date.prototype.addDays=function(value){return this.addMilliseconds(value*86400000);};Date.prototype.addWeeks=function(value){return this.addMilliseconds(value*604800000);};Date.prototype.addMonths=function(value){var n=this.getDate();this.setDate(1);this.setMonth(this.getMonth()+value);this.setDate(Math.min(n,this.getDaysInMonth()));return this;};Date.prototype.addYears=function(value){return this.addMonths(value*12);};Date.prototype.add=function(config){if(typeof config=="number"){this._orient=config;return this;}
|
14 |
+
var x=config;if(x.millisecond||x.milliseconds){this.addMilliseconds(x.millisecond||x.milliseconds);}
|
15 |
+
if(x.second||x.seconds){this.addSeconds(x.second||x.seconds);}
|
16 |
+
if(x.minute||x.minutes){this.addMinutes(x.minute||x.minutes);}
|
17 |
+
if(x.hour||x.hours){this.addHours(x.hour||x.hours);}
|
18 |
+
if(x.month||x.months){this.addMonths(x.month||x.months);}
|
19 |
+
if(x.year||x.years){this.addYears(x.year||x.years);}
|
20 |
+
if(x.day||x.days){this.addDays(x.day||x.days);}
|
21 |
+
return this;};Date._validate=function(value,min,max,name){if(typeof value!="number"){throw new TypeError(value+" is not a Number.");}else if(value<min||value>max){throw new RangeError(value+" is not a valid value for "+name+".");}
|
22 |
+
return true;};Date.validateMillisecond=function(n){return Date._validate(n,0,999,"milliseconds");};Date.validateSecond=function(n){return Date._validate(n,0,59,"seconds");};Date.validateMinute=function(n){return Date._validate(n,0,59,"minutes");};Date.validateHour=function(n){return Date._validate(n,0,23,"hours");};Date.validateDay=function(n,year,month){return Date._validate(n,1,Date.getDaysInMonth(year,month),"days");};Date.validateMonth=function(n){return Date._validate(n,0,11,"months");};Date.validateYear=function(n){return Date._validate(n,1,9999,"seconds");};Date.prototype.set=function(config){var x=config;if(!x.millisecond&&x.millisecond!==0){x.millisecond=-1;}
|
23 |
+
if(!x.second&&x.second!==0){x.second=-1;}
|
24 |
+
if(!x.minute&&x.minute!==0){x.minute=-1;}
|
25 |
+
if(!x.hour&&x.hour!==0){x.hour=-1;}
|
26 |
+
if(!x.day&&x.day!==0){x.day=-1;}
|
27 |
+
if(!x.month&&x.month!==0){x.month=-1;}
|
28 |
+
if(!x.year&&x.year!==0){x.year=-1;}
|
29 |
+
if(x.millisecond!=-1&&Date.validateMillisecond(x.millisecond)){this.addMilliseconds(x.millisecond-this.getMilliseconds());}
|
30 |
+
if(x.second!=-1&&Date.validateSecond(x.second)){this.addSeconds(x.second-this.getSeconds());}
|
31 |
+
if(x.minute!=-1&&Date.validateMinute(x.minute)){this.addMinutes(x.minute-this.getMinutes());}
|
32 |
+
if(x.hour!=-1&&Date.validateHour(x.hour)){this.addHours(x.hour-this.getHours());}
|
33 |
+
if(x.month!==-1&&Date.validateMonth(x.month)){this.addMonths(x.month-this.getMonth());}
|
34 |
+
if(x.year!=-1&&Date.validateYear(x.year)){this.addYears(x.year-this.getFullYear());}
|
35 |
+
if(x.day!=-1&&Date.validateDay(x.day,this.getFullYear(),this.getMonth())){this.addDays(x.day-this.getDate());}
|
36 |
+
if(x.timezone){this.setTimezone(x.timezone);}
|
37 |
+
if(x.timezoneOffset){this.setTimezoneOffset(x.timezoneOffset);}
|
38 |
+
return this;};Date.prototype.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this;};Date.prototype.isLeapYear=function(){var y=this.getFullYear();return(((y%4===0)&&(y%100!==0))||(y%400===0));};Date.prototype.isWeekday=function(){return!(this.is().sat()||this.is().sun());};Date.prototype.getDaysInMonth=function(){return Date.getDaysInMonth(this.getFullYear(),this.getMonth());};Date.prototype.moveToFirstDayOfMonth=function(){return this.set({day:1});};Date.prototype.moveToLastDayOfMonth=function(){return this.set({day:this.getDaysInMonth()});};Date.prototype.moveToDayOfWeek=function(day,orient){var diff=(day-this.getDay()+7*(orient||+1))%7;return this.addDays((diff===0)?diff+=7*(orient||+1):diff);};Date.prototype.moveToMonth=function(month,orient){var diff=(month-this.getMonth()+12*(orient||+1))%12;return this.addMonths((diff===0)?diff+=12*(orient||+1):diff);};Date.prototype.getDayOfYear=function(){return Math.floor((this-new Date(this.getFullYear(),0,1))/86400000);};Date.prototype.getWeekOfYear=function(firstDayOfWeek){var y=this.getFullYear(),m=this.getMonth(),d=this.getDate();var dow=firstDayOfWeek||Date.CultureInfo.firstDayOfWeek;var offset=7+1-new Date(y,0,1).getDay();if(offset==8){offset=1;}
|
39 |
+
var daynum=((Date.UTC(y,m,d,0,0,0)-Date.UTC(y,0,1,0,0,0))/86400000)+1;var w=Math.floor((daynum-offset+7)/7);if(w===dow){y--;var prevOffset=7+1-new Date(y,0,1).getDay();if(prevOffset==2||prevOffset==8){w=53;}else{w=52;}}
|
40 |
+
return w;};Date.prototype.isDST=function(){console.log('isDST');return this.toString().match(/(E|C|M|P)(S|D)T/)[2]=="D";};Date.prototype.getTimezone=function(){return Date.getTimezoneAbbreviation(this.getUTCOffset,this.isDST());};Date.prototype.setTimezoneOffset=function(s){var here=this.getTimezoneOffset(),there=Number(s)*-6/10;this.addMinutes(there-here);return this;};Date.prototype.setTimezone=function(s){return this.setTimezoneOffset(Date.getTimezoneOffset(s));};Date.prototype.getUTCOffset=function(){var n=this.getTimezoneOffset()*-10/6,r;if(n<0){r=(n-10000).toString();return r[0]+r.substr(2);}else{r=(n+10000).toString();return"+"+r.substr(1);}};Date.prototype.getDayName=function(abbrev){return abbrev?Date.CultureInfo.abbreviatedDayNames[this.getDay()]:Date.CultureInfo.dayNames[this.getDay()];};Date.prototype.getMonthName=function(abbrev){return abbrev?Date.CultureInfo.abbreviatedMonthNames[this.getMonth()]:Date.CultureInfo.monthNames[this.getMonth()];};Date.prototype._toString=Date.prototype.toString;Date.prototype.toString=function(format){var self=this;var p=function p(s){return(s.toString().length==1)?"0"+s:s;};return format?format.replace(/dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|zz?z?/g,function(format){switch(format){case"hh":return p(self.getHours()<13?self.getHours():(self.getHours()-12));case"h":return self.getHours()<13?self.getHours():(self.getHours()-12);case"HH":return p(self.getHours());case"H":return self.getHours();case"mm":return p(self.getMinutes());case"m":return self.getMinutes();case"ss":return p(self.getSeconds());case"s":return self.getSeconds();case"yyyy":return self.getFullYear();case"yy":return self.getFullYear().toString().substring(2,4);case"dddd":return self.getDayName();case"ddd":return self.getDayName(true);case"dd":return p(self.getDate());case"d":return self.getDate().toString();case"MMMM":return self.getMonthName();case"MMM":return self.getMonthName(true);case"MM":return p((self.getMonth()+1));case"M":return self.getMonth()+1;case"t":return self.getHours()<12?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case"tt":return self.getHours()<12?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case"zzz":case"zz":case"z":return"";}}):this._toString();};
|
41 |
+
Date.now=function(){return new Date();};Date.today=function(){return Date.now().clearTime();};Date.prototype._orient=+1;Date.prototype.next=function(){this._orient=+1;return this;};Date.prototype.last=Date.prototype.prev=Date.prototype.previous=function(){this._orient=-1;return this;};Date.prototype._is=false;Date.prototype.is=function(){this._is=true;return this;};Number.prototype._dateElement="day";Number.prototype.fromNow=function(){var c={};c[this._dateElement]=this;return Date.now().add(c);};Number.prototype.ago=function(){var c={};c[this._dateElement]=this*-1;return Date.now().add(c);};(function(){var $D=Date.prototype,$N=Number.prototype;var dx=("sunday monday tuesday wednesday thursday friday saturday").split(/\s/),mx=("january february march april may june july august september october november december").split(/\s/),px=("Millisecond Second Minute Hour Day Week Month Year").split(/\s/),de;var df=function(n){return function(){if(this._is){this._is=false;return this.getDay()==n;}
|
42 |
+
return this.moveToDayOfWeek(n,this._orient);};};for(var i=0;i<dx.length;i++){$D[dx[i]]=$D[dx[i].substring(0,3)]=df(i);}
|
43 |
+
var mf=function(n){return function(){if(this._is){this._is=false;return this.getMonth()===n;}
|
44 |
+
return this.moveToMonth(n,this._orient);};};for(var j=0;j<mx.length;j++){$D[mx[j]]=$D[mx[j].substring(0,3)]=mf(j);}
|
45 |
+
var ef=function(j){return function(){if(j.substring(j.length-1)!="s"){j+="s";}
|
46 |
+
return this["add"+j](this._orient);};};var nf=function(n){return function(){this._dateElement=n;return this;};};for(var k=0;k<px.length;k++){de=px[k].toLowerCase();$D[de]=$D[de+"s"]=ef(px[k]);$N[de]=$N[de+"s"]=nf(de);}}());Date.prototype.toJSONString=function(){return this.toString("yyyy-MM-ddThh:mm:ssZ");};Date.prototype.toShortDateString=function(){return this.toString(Date.CultureInfo.formatPatterns.shortDatePattern);};Date.prototype.toLongDateString=function(){return this.toString(Date.CultureInfo.formatPatterns.longDatePattern);};Date.prototype.toShortTimeString=function(){return this.toString(Date.CultureInfo.formatPatterns.shortTimePattern);};Date.prototype.toLongTimeString=function(){return this.toString(Date.CultureInfo.formatPatterns.longTimePattern);};Date.prototype.getOrdinal=function(){switch(this.getDate()){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th";}};
|
47 |
+
(function(){Date.Parsing={Exception:function(s){this.message="Parse error at '"+s.substring(0,10)+" ...'";}};var $P=Date.Parsing;var _=$P.Operators={rtoken:function(r){return function(s){var mx=s.match(r);if(mx){return([mx[0],s.substring(mx[0].length)]);}else{throw new $P.Exception(s);}};},token:function(s){return function(s){return _.rtoken(new RegExp("^\s*"+s+"\s*"))(s);};},stoken:function(s){return _.rtoken(new RegExp("^"+s));},until:function(p){return function(s){var qx=[],rx=null;while(s.length){try{rx=p.call(this,s);}catch(e){qx.push(rx[0]);s=rx[1];continue;}
|
48 |
+
break;}
|
49 |
+
return[qx,s];};},many:function(p){return function(s){var rx=[],r=null;while(s.length){try{r=p.call(this,s);}catch(e){return[rx,s];}
|
50 |
+
rx.push(r[0]);s=r[1];}
|
51 |
+
return[rx,s];};},optional:function(p){return function(s){var r=null;try{r=p.call(this,s);}catch(e){return[null,s];}
|
52 |
+
return[r[0],r[1]];};},not:function(p){return function(s){try{p.call(this,s);}catch(e){return[null,s];}
|
53 |
+
throw new $P.Exception(s);};},ignore:function(p){return p?function(s){var r=null;r=p.call(this,s);return[null,r[1]];}:null;},product:function(){var px=arguments[0],qx=Array.prototype.slice.call(arguments,1),rx=[];for(var i=0;i<px.length;i++){rx.push(_.each(px[i],qx));}
|
54 |
+
return rx;},cache:function(rule){var cache={},r=null;return function(s){try{r=cache[s]=(cache[s]||rule.call(this,s));}catch(e){r=cache[s]=e;}
|
55 |
+
if(r instanceof $P.Exception){throw r;}else{return r;}};},any:function(){var px=arguments;return function(s){var r=null;for(var i=0;i<px.length;i++){if(px[i]==null){continue;}
|
56 |
+
try{r=(px[i].call(this,s));}catch(e){r=null;}
|
57 |
+
if(r){return r;}}
|
58 |
+
throw new $P.Exception(s);};},each:function(){var px=arguments;return function(s){var rx=[],r=null;for(var i=0;i<px.length;i++){if(px[i]==null){continue;}
|
59 |
+
try{r=(px[i].call(this,s));}catch(e){throw new $P.Exception(s);}
|
60 |
+
rx.push(r[0]);s=r[1];}
|
61 |
+
return[rx,s];};},all:function(){var px=arguments,_=_;return _.each(_.optional(px));},sequence:function(px,d,c){d=d||_.rtoken(/^\s*/);c=c||null;if(px.length==1){return px[0];}
|
62 |
+
return function(s){var r=null,q=null;var rx=[];for(var i=0;i<px.length;i++){try{r=px[i].call(this,s);}catch(e){break;}
|
63 |
+
rx.push(r[0]);try{q=d.call(this,r[1]);}catch(ex){q=null;break;}
|
64 |
+
s=q[1];}
|
65 |
+
if(!r){throw new $P.Exception(s);}
|
66 |
+
if(q){throw new $P.Exception(q[1]);}
|
67 |
+
if(c){try{r=c.call(this,r[1]);}catch(ey){throw new $P.Exception(r[1]);}}
|
68 |
+
return[rx,(r?r[1]:s)];};},between:function(d1,p,d2){d2=d2||d1;var _fn=_.each(_.ignore(d1),p,_.ignore(d2));return function(s){var rx=_fn.call(this,s);return[[rx[0][0],r[0][2]],rx[1]];};},list:function(p,d,c){d=d||_.rtoken(/^\s*/);c=c||null;return(p instanceof Array?_.each(_.product(p.slice(0,-1),_.ignore(d)),p.slice(-1),_.ignore(c)):_.each(_.many(_.each(p,_.ignore(d))),px,_.ignore(c)));},set:function(px,d,c){d=d||_.rtoken(/^\s*/);c=c||null;return function(s){var r=null,p=null,q=null,rx=null,best=[[],s],last=false;for(var i=0;i<px.length;i++){q=null;p=null;r=null;last=(px.length==1);try{r=px[i].call(this,s);}catch(e){continue;}
|
69 |
+
rx=[[r[0]],r[1]];if(r[1].length>0&&!last){try{q=d.call(this,r[1]);}catch(ex){last=true;}}else{last=true;}
|
70 |
+
if(!last&&q[1].length===0){last=true;}
|
71 |
+
if(!last){var qx=[];for(var j=0;j<px.length;j++){if(i!=j){qx.push(px[j]);}}
|
72 |
+
p=_.set(qx,d).call(this,q[1]);if(p[0].length>0){rx[0]=rx[0].concat(p[0]);rx[1]=p[1];}}
|
73 |
+
if(rx[1].length<best[1].length){best=rx;}
|
74 |
+
if(best[1].length===0){break;}}
|
75 |
+
if(best[0].length===0){return best;}
|
76 |
+
if(c){try{q=c.call(this,best[1]);}catch(ey){throw new $P.Exception(best[1]);}
|
77 |
+
best[1]=q[1];}
|
78 |
+
return best;};},forward:function(gr,fname){return function(s){return gr[fname].call(this,s);};},replace:function(rule,repl){return function(s){var r=rule.call(this,s);return[repl,r[1]];};},process:function(rule,fn){return function(s){var r=rule.call(this,s);return[fn.call(this,r[0]),r[1]];};},min:function(min,rule){return function(s){var rx=rule.call(this,s);if(rx[0].length<min){throw new $P.Exception(s);}
|
79 |
+
return rx;};}};var _generator=function(op){return function(){var args=null,rx=[];if(arguments.length>1){args=Array.prototype.slice.call(arguments);}else if(arguments[0]instanceof Array){args=arguments[0];}
|
80 |
+
if(args){for(var i=0,px=args.shift();i<px.length;i++){args.unshift(px[i]);rx.push(op.apply(null,args));args.shift();return rx;}}else{return op.apply(null,arguments);}};};var gx="optional not ignore cache".split(/\s/);for(var i=0;i<gx.length;i++){_[gx[i]]=_generator(_[gx[i]]);}
|
81 |
+
var _vector=function(op){return function(){if(arguments[0]instanceof Array){return op.apply(null,arguments[0]);}else{return op.apply(null,arguments);}};};var vx="each any all".split(/\s/);for(var j=0;j<vx.length;j++){_[vx[j]]=_vector(_[vx[j]]);}}());(function(){var flattenAndCompact=function(ax){var rx=[];for(var i=0;i<ax.length;i++){if(ax[i]instanceof Array){rx=rx.concat(flattenAndCompact(ax[i]));}else{if(ax[i]){rx.push(ax[i]);}}}
|
82 |
+
return rx;};Date.Grammar={};Date.Translator={hour:function(s){return function(){this.hour=Number(s);};},minute:function(s){return function(){this.minute=Number(s);};},second:function(s){return function(){this.second=Number(s);};},meridian:function(s){return function(){this.meridian=s.slice(0,1).toLowerCase();};},timezone:function(s){return function(){var n=s.replace(/[^\d\+\-]/g,"");if(n.length){this.timezoneOffset=Number(n);}else{this.timezone=s.toLowerCase();}};},day:function(x){var s=x[0];return function(){this.day=Number(s.match(/\d+/)[0]);};},month:function(s){return function(){this.month=((s.length==3)?Date.getMonthNumberFromName(s):(Number(s)-1));};},year:function(s){return function(){var n=Number(s);this.year=((s.length>2)?n:(n+(((n+2000)<Date.CultureInfo.twoDigitYearMax)?2000:1900)));};},rday:function(s){return function(){switch(s){case"yesterday":this.days=-1;break;case"tomorrow":this.days=1;break;case"today":this.days=0;break;case"now":this.days=0;this.now=true;break;}};},finishExact:function(x){x=(x instanceof Array)?x:[x];var now=new Date();this.year=now.getFullYear();this.month=now.getMonth();this.day=1;this.hour=0;this.minute=0;this.second=0;for(var i=0;i<x.length;i++){if(x[i]){x[i].call(this);}}
|
83 |
+
this.hour=(this.meridian=="p"&&this.hour<13)?this.hour+12:this.hour;if(this.day>Date.getDaysInMonth(this.year,this.month)){throw new RangeError(this.day+" is not a valid value for days.");}
|
84 |
+
var r=new Date(this.year,this.month,this.day,this.hour,this.minute,this.second);if(this.timezone){r.set({timezone:this.timezone});}else if(this.timezoneOffset){r.set({timezoneOffset:this.timezoneOffset});}
|
85 |
+
return r;},finish:function(x){x=(x instanceof Array)?flattenAndCompact(x):[x];if(x.length===0){return null;}
|
86 |
+
for(var i=0;i<x.length;i++){if(typeof x[i]=="function"){x[i].call(this);}}
|
87 |
+
if(this.now){return new Date();}
|
88 |
+
var today=Date.today();var method=null;var expression=!!(this.days!=null||this.orient||this.operator);if(expression){var gap,mod,orient;orient=((this.orient=="past"||this.operator=="subtract")?-1:1);if(this.weekday){this.unit="day";gap=(Date.getDayNumberFromName(this.weekday)-today.getDay());mod=7;this.days=gap?((gap+(orient*mod))%mod):(orient*mod);}
|
89 |
+
if(this.month){this.unit="month";gap=(this.month-today.getMonth());mod=12;this.months=gap?((gap+(orient*mod))%mod):(orient*mod);this.month=null;}
|
90 |
+
if(!this.unit){this.unit="day";}
|
91 |
+
if(this[this.unit+"s"]==null||this.operator!=null){if(!this.value){this.value=1;}
|
92 |
+
if(this.unit=="week"){this.unit="day";this.value=this.value*7;}
|
93 |
+
this[this.unit+"s"]=this.value*orient;}
|
94 |
+
return today.add(this);}else{if(this.meridian&&this.hour){this.hour=(this.hour<13&&this.meridian=="p")?this.hour+12:this.hour;}
|
95 |
+
if(this.weekday&&!this.day){this.day=(today.addDays((Date.getDayNumberFromName(this.weekday)-today.getDay()))).getDate();}
|
96 |
+
if(this.month&&!this.day){this.day=1;}
|
97 |
+
return today.set(this);}}};var _=Date.Parsing.Operators,g=Date.Grammar,t=Date.Translator,_fn;g.datePartDelimiter=_.rtoken(/^([\s\-\.\,\/\x27]+)/);g.timePartDelimiter=_.stoken(":");g.whiteSpace=_.rtoken(/^\s*/);g.generalDelimiter=_.rtoken(/^(([\s\,]|at|on)+)/);var _C={};g.ctoken=function(keys){var fn=_C[keys];if(!fn){var c=Date.CultureInfo.regexPatterns;var kx=keys.split(/\s+/),px=[];for(var i=0;i<kx.length;i++){px.push(_.replace(_.rtoken(c[kx[i]]),kx[i]));}
|
98 |
+
fn=_C[keys]=_.any.apply(null,px);}
|
99 |
+
return fn;};g.ctoken2=function(key){return _.rtoken(Date.CultureInfo.regexPatterns[key]);};g.h=_.cache(_.process(_.rtoken(/^(0[0-9]|1[0-2]|[1-9])/),t.hour));g.hh=_.cache(_.process(_.rtoken(/^(0[0-9]|1[0-2])/),t.hour));g.H=_.cache(_.process(_.rtoken(/^([0-1][0-9]|2[0-3]|[0-9])/),t.hour));g.HH=_.cache(_.process(_.rtoken(/^([0-1][0-9]|2[0-3])/),t.hour));g.m=_.cache(_.process(_.rtoken(/^([0-5][0-9]|[0-9])/),t.minute));g.mm=_.cache(_.process(_.rtoken(/^[0-5][0-9]/),t.minute));g.s=_.cache(_.process(_.rtoken(/^([0-5][0-9]|[0-9])/),t.second));g.ss=_.cache(_.process(_.rtoken(/^[0-5][0-9]/),t.second));g.hms=_.cache(_.sequence([g.H,g.mm,g.ss],g.timePartDelimiter));g.t=_.cache(_.process(g.ctoken2("shortMeridian"),t.meridian));g.tt=_.cache(_.process(g.ctoken2("longMeridian"),t.meridian));g.z=_.cache(_.process(_.rtoken(/^(\+|\-)?\s*\d\d\d\d?/),t.timezone));g.zz=_.cache(_.process(_.rtoken(/^(\+|\-)\s*\d\d\d\d/),t.timezone));g.zzz=_.cache(_.process(g.ctoken2("timezone"),t.timezone));g.timeSuffix=_.each(_.ignore(g.whiteSpace),_.set([g.tt,g.zzz]));g.time=_.each(_.optional(_.ignore(_.stoken("T"))),g.hms,g.timeSuffix);g.d=_.cache(_.process(_.each(_.rtoken(/^([0-2]\d|3[0-1]|\d)/),_.optional(g.ctoken2("ordinalSuffix"))),t.day));g.dd=_.cache(_.process(_.each(_.rtoken(/^([0-2]\d|3[0-1])/),_.optional(g.ctoken2("ordinalSuffix"))),t.day));g.ddd=g.dddd=_.cache(_.process(g.ctoken("sun mon tue wed thu fri sat"),function(s){return function(){this.weekday=s;};}));g.M=_.cache(_.process(_.rtoken(/^(1[0-2]|0\d|\d)/),t.month));g.MM=_.cache(_.process(_.rtoken(/^(1[0-2]|0\d)/),t.month));g.MMM=g.MMMM=_.cache(_.process(g.ctoken("jan feb mar apr may jun jul aug sep oct nov dec"),t.month));g.y=_.cache(_.process(_.rtoken(/^(\d\d?)/),t.year));g.yy=_.cache(_.process(_.rtoken(/^(\d\d)/),t.year));g.yyy=_.cache(_.process(_.rtoken(/^(\d\d?\d?\d?)/),t.year));g.yyyy=_.cache(_.process(_.rtoken(/^(\d\d\d\d)/),t.year));_fn=function(){return _.each(_.any.apply(null,arguments),_.not(g.ctoken2("timeContext")));};g.day=_fn(g.d,g.dd);g.month=_fn(g.M,g.MMM);g.year=_fn(g.yyyy,g.yy);g.orientation=_.process(g.ctoken("past future"),function(s){return function(){this.orient=s;};});g.operator=_.process(g.ctoken("add subtract"),function(s){return function(){this.operator=s;};});g.rday=_.process(g.ctoken("yesterday tomorrow today now"),t.rday);g.unit=_.process(g.ctoken("minute hour day week month year"),function(s){return function(){this.unit=s;};});g.value=_.process(_.rtoken(/^\d\d?(st|nd|rd|th)?/),function(s){return function(){this.value=s.replace(/\D/g,"");};});g.expression=_.set([g.rday,g.operator,g.value,g.unit,g.orientation,g.ddd,g.MMM]);_fn=function(){return _.set(arguments,g.datePartDelimiter);};g.mdy=_fn(g.ddd,g.month,g.day,g.year);g.ymd=_fn(g.ddd,g.year,g.month,g.day);g.dmy=_fn(g.ddd,g.day,g.month,g.year);g.date=function(s){return((g[Date.CultureInfo.dateElementOrder]||g.mdy).call(this,s));};g.format=_.process(_.many(_.any(_.process(_.rtoken(/^(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|zz?z?)/),function(fmt){if(g[fmt]){return g[fmt];}else{throw Date.Parsing.Exception(fmt);}}),_.process(_.rtoken(/^[^dMyhHmstz]+/),function(s){return _.ignore(_.stoken(s));}))),function(rules){return _.process(_.each.apply(null,rules),t.finishExact);});var _F={};var _get=function(f){return _F[f]=(_F[f]||g.format(f)[0]);};g.formats=function(fx){if(fx instanceof Array){var rx=[];for(var i=0;i<fx.length;i++){rx.push(_get(fx[i]));}
|
100 |
+
return _.any.apply(null,rx);}else{return _get(fx);}};g._formats=g.formats(["yyyy-MM-ddTHH:mm:ss","ddd, MMM dd, yyyy H:mm:ss tt","ddd MMM d yyyy HH:mm:ss zzz","d"]);g._start=_.process(_.set([g.date,g.time,g.expression],g.generalDelimiter,g.whiteSpace),t.finish);g.start=function(s){try{var r=g._formats.call({},s);if(r[1].length===0){return r;}}catch(e){}
|
101 |
+
return g._start.call({},s);};}());Date._parse=Date.parse;Date.parse=function(s){var r=null;if(!s){return null;}
|
102 |
+
try{r=Date.Grammar.start.call({},s);}catch(e){return null;}
|
103 |
+
return((r[1].length===0)?r[0]:null);};Date.getParseFunction=function(fx){var fn=Date.Grammar.formats(fx);return function(s){var r=null;try{r=fn.call({},s);}catch(e){return null;}
|
104 |
+
return((r[1].length===0)?r[0]:null);};};Date.parseExact=function(s,fx){return Date.getParseFunction(fx)(s);};
|
lib/lib.txt
CHANGED
@@ -46,13 +46,6 @@ The scrollable library supports the mouse wheel scrolling and manages the calend
|
|
46 |
http://flowplayer.org/tools/scrollable.html
|
47 |
MIT License
|
48 |
|
49 |
-
ui.core.js
|
50 |
-
ui.draggable.js
|
51 |
-
ui.droppable.js
|
52 |
-
The draggable, droppable, and UI core support drag and drop.
|
53 |
-
http://jqueryui.com/demos/draggable/
|
54 |
-
MIT License
|
55 |
-
|
56 |
qunit.js
|
57 |
qunit.css
|
58 |
A unit testing framework for the calendar
|
46 |
http://flowplayer.org/tools/scrollable.html
|
47 |
MIT License
|
48 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
49 |
qunit.js
|
50 |
qunit.css
|
51 |
A unit testing framework for the calendar
|
lib/ui.core.js
DELETED
@@ -1,519 +0,0 @@
|
|
1 |
-
/*
|
2 |
-
* jQuery UI 1.7.2
|
3 |
-
*
|
4 |
-
* Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
|
5 |
-
* Dual licensed under the MIT (MIT-LICENSE.txt)
|
6 |
-
* and GPL (GPL-LICENSE.txt) licenses.
|
7 |
-
*
|
8 |
-
* http://docs.jquery.com/UI
|
9 |
-
*/
|
10 |
-
;jQuery.ui || (function(jQuery) {
|
11 |
-
|
12 |
-
var _remove = jQuery.fn.remove,
|
13 |
-
isFF2 = jQuery.browser.mozilla && (parseFloat(jQuery.browser.version) < 1.9);
|
14 |
-
|
15 |
-
//Helper functions and ui object
|
16 |
-
jQuery.ui = {
|
17 |
-
version: "1.7.2",
|
18 |
-
|
19 |
-
// jQuery.ui.plugin is deprecated. Use the proxy pattern instead.
|
20 |
-
plugin: {
|
21 |
-
add: function(module, option, set) {
|
22 |
-
var proto = jQuery.ui[module].prototype;
|
23 |
-
for(var i in set) {
|
24 |
-
proto.plugins[i] = proto.plugins[i] || [];
|
25 |
-
proto.plugins[i].push([option, set[i]]);
|
26 |
-
}
|
27 |
-
},
|
28 |
-
call: function(instance, name, args) {
|
29 |
-
var set = instance.plugins[name];
|
30 |
-
if(!set || !instance.element[0].parentNode) { return; }
|
31 |
-
|
32 |
-
for (var i = 0; i < set.length; i++) {
|
33 |
-
if (instance.options[set[i][0]]) {
|
34 |
-
set[i][1].apply(instance.element, args);
|
35 |
-
}
|
36 |
-
}
|
37 |
-
}
|
38 |
-
},
|
39 |
-
|
40 |
-
contains: function(a, b) {
|
41 |
-
return document.compareDocumentPosition
|
42 |
-
? a.compareDocumentPosition(b) & 16
|
43 |
-
: a !== b && a.contains(b);
|
44 |
-
},
|
45 |
-
|
46 |
-
hasScroll: function(el, a) {
|
47 |
-
|
48 |
-
//If overflow is hidden, the element might have extra content, but the user wants to hide it
|
49 |
-
if (jQuery(el).css('overflow') == 'hidden') { return false; }
|
50 |
-
|
51 |
-
var scroll = (a && a == 'left') ? 'scrollLeft' : 'scrollTop',
|
52 |
-
has = false;
|
53 |
-
|
54 |
-
if (el[scroll] > 0) { return true; }
|
55 |
-
|
56 |
-
// TODO: determine which cases actually cause this to happen
|
57 |
-
// if the element doesn't have the scroll set, see if it's possible to
|
58 |
-
// set the scroll
|
59 |
-
el[scroll] = 1;
|
60 |
-
has = (el[scroll] > 0);
|
61 |
-
el[scroll] = 0;
|
62 |
-
return has;
|
63 |
-
},
|
64 |
-
|
65 |
-
isOverAxis: function(x, reference, size) {
|
66 |
-
//Determines when x coordinate is over "b" element axis
|
67 |
-
return (x > reference) && (x < (reference + size));
|
68 |
-
},
|
69 |
-
|
70 |
-
isOver: function(y, x, top, left, height, width) {
|
71 |
-
//Determines when x, y coordinates is over "b" element
|
72 |
-
return jQuery.ui.isOverAxis(y, top, height) && jQuery.ui.isOverAxis(x, left, width);
|
73 |
-
},
|
74 |
-
|
75 |
-
keyCode: {
|
76 |
-
BACKSPACE: 8,
|
77 |
-
CAPS_LOCK: 20,
|
78 |
-
COMMA: 188,
|
79 |
-
CONTROL: 17,
|
80 |
-
DELETE: 46,
|
81 |
-
DOWN: 40,
|
82 |
-
END: 35,
|
83 |
-
ENTER: 13,
|
84 |
-
ESCAPE: 27,
|
85 |
-
HOME: 36,
|
86 |
-
INSERT: 45,
|
87 |
-
LEFT: 37,
|
88 |
-
NUMPAD_ADD: 107,
|
89 |
-
NUMPAD_DECIMAL: 110,
|
90 |
-
NUMPAD_DIVIDE: 111,
|
91 |
-
NUMPAD_ENTER: 108,
|
92 |
-
NUMPAD_MULTIPLY: 106,
|
93 |
-
NUMPAD_SUBTRACT: 109,
|
94 |
-
PAGE_DOWN: 34,
|
95 |
-
PAGE_UP: 33,
|
96 |
-
PERIOD: 190,
|
97 |
-
RIGHT: 39,
|
98 |
-
SHIFT: 16,
|
99 |
-
SPACE: 32,
|
100 |
-
TAB: 9,
|
101 |
-
UP: 38
|
102 |
-
}
|
103 |
-
};
|
104 |
-
|
105 |
-
// WAI-ARIA normalization
|
106 |
-
if (isFF2) {
|
107 |
-
var attr = jQuery.attr,
|
108 |
-
removeAttr = jQuery.fn.removeAttr,
|
109 |
-
ariaNS = "http://www.w3.org/2005/07/aaa",
|
110 |
-
ariaState = /^aria-/,
|
111 |
-
ariaRole = /^wairole:/;
|
112 |
-
|
113 |
-
jQuery.attr = function(elem, name, value) {
|
114 |
-
var set = value !== undefined;
|
115 |
-
|
116 |
-
return (name == 'role'
|
117 |
-
? (set
|
118 |
-
? attr.call(this, elem, name, "wairole:" + value)
|
119 |
-
: (attr.apply(this, arguments) || "").replace(ariaRole, ""))
|
120 |
-
: (ariaState.test(name)
|
121 |
-
? (set
|
122 |
-
? elem.setAttributeNS(ariaNS,
|
123 |
-
name.replace(ariaState, "aaa:"), value)
|
124 |
-
: attr.call(this, elem, name.replace(ariaState, "aaa:")))
|
125 |
-
: attr.apply(this, arguments)));
|
126 |
-
};
|
127 |
-
|
128 |
-
jQuery.fn.removeAttr = function(name) {
|
129 |
-
return (ariaState.test(name)
|
130 |
-
? this.each(function() {
|
131 |
-
this.removeAttributeNS(ariaNS, name.replace(ariaState, ""));
|
132 |
-
}) : removeAttr.call(this, name));
|
133 |
-
};
|
134 |
-
}
|
135 |
-
|
136 |
-
//jQuery plugins
|
137 |
-
jQuery.fn.extend({
|
138 |
-
remove: function() {
|
139 |
-
// Safari has a native remove event which actually removes DOM elements,
|
140 |
-
// so we have to use triggerHandler instead of trigger (#3037).
|
141 |
-
jQuery("*", this).add(this).each(function() {
|
142 |
-
jQuery(this).triggerHandler("remove");
|
143 |
-
});
|
144 |
-
return _remove.apply(this, arguments );
|
145 |
-
},
|
146 |
-
|
147 |
-
enableSelection: function() {
|
148 |
-
return this
|
149 |
-
.attr('unselectable', 'off')
|
150 |
-
.css('MozUserSelect', '')
|
151 |
-
.unbind('selectstart.ui');
|
152 |
-
},
|
153 |
-
|
154 |
-
disableSelection: function() {
|
155 |
-
return this
|
156 |
-
.attr('unselectable', 'on')
|
157 |
-
.css('MozUserSelect', 'none')
|
158 |
-
.bind('selectstart.ui', function() { return false; });
|
159 |
-
},
|
160 |
-
|
161 |
-
scrollParent: function() {
|
162 |
-
var scrollParent;
|
163 |
-
if((jQuery.browser.msie && (/(static|relative)/).test(this.css('position'))) || (/absolute/).test(this.css('position'))) {
|
164 |
-
scrollParent = this.parents().filter(function() {
|
165 |
-
return (/(relative|absolute|fixed)/).test(jQuery.curCSS(this,'position',1)) && (/(auto|scroll)/).test(jQuery.curCSS(this,'overflow',1)+jQuery.curCSS(this,'overflow-y',1)+jQuery.curCSS(this,'overflow-x',1));
|
166 |
-
}).eq(0);
|
167 |
-
} else {
|
168 |
-
scrollParent = this.parents().filter(function() {
|
169 |
-
return (/(auto|scroll)/).test(jQuery.curCSS(this,'overflow',1)+jQuery.curCSS(this,'overflow-y',1)+jQuery.curCSS(this,'overflow-x',1));
|
170 |
-
}).eq(0);
|
171 |
-
}
|
172 |
-
|
173 |
-
return (/fixed/).test(this.css('position')) || !scrollParent.length ? jQuery(document) : scrollParent;
|
174 |
-
}
|
175 |
-
});
|
176 |
-
|
177 |
-
|
178 |
-
//Additional selectors
|
179 |
-
jQuery.extend(jQuery.expr[':'], {
|
180 |
-
data: function(elem, i, match) {
|
181 |
-
return !!jQuery.data(elem, match[3]);
|
182 |
-
},
|
183 |
-
|
184 |
-
focusable: function(element) {
|
185 |
-
var nodeName = element.nodeName.toLowerCase(),
|
186 |
-
tabIndex = jQuery.attr(element, 'tabindex');
|
187 |
-
return (/input|select|textarea|button|object/.test(nodeName)
|
188 |
-
? !element.disabled
|
189 |
-
: 'a' == nodeName || 'area' == nodeName
|
190 |
-
? element.href || !isNaN(tabIndex)
|
191 |
-
: !isNaN(tabIndex))
|
192 |
-
// the element and all of its ancestors must be visible
|
193 |
-
// the browser may report that the area is hidden
|
194 |
-
&& !jQuery(element)['area' == nodeName ? 'parents' : 'closest'](':hidden').length;
|
195 |
-
},
|
196 |
-
|
197 |
-
tabbable: function(element) {
|
198 |
-
var tabIndex = jQuery.attr(element, 'tabindex');
|
199 |
-
return (isNaN(tabIndex) || tabIndex >= 0) && jQuery(element).is(':focusable');
|
200 |
-
}
|
201 |
-
});
|
202 |
-
|
203 |
-
|
204 |
-
// jQuery.widget is a factory to create jQuery plugins
|
205 |
-
// taking some boilerplate code out of the plugin code
|
206 |
-
function getter(namespace, plugin, method, args) {
|
207 |
-
function getMethods(type) {
|
208 |
-
var methods = jQuery[namespace][plugin][type] || [];
|
209 |
-
return (typeof methods == 'string' ? methods.split(/,?\s+/) : methods);
|
210 |
-
}
|
211 |
-
|
212 |
-
var methods = getMethods('getter');
|
213 |
-
if (args.length == 1 && typeof args[0] == 'string') {
|
214 |
-
methods = methods.concat(getMethods('getterSetter'));
|
215 |
-
}
|
216 |
-
return (jQuery.inArray(method, methods) != -1);
|
217 |
-
}
|
218 |
-
|
219 |
-
jQuery.widget = function(name, prototype) {
|
220 |
-
var namespace = name.split(".")[0];
|
221 |
-
name = name.split(".")[1];
|
222 |
-
|
223 |
-
// create plugin method
|
224 |
-
jQuery.fn[name] = function(options) {
|
225 |
-
var isMethodCall = (typeof options == 'string'),
|
226 |
-
args = Array.prototype.slice.call(arguments, 1);
|
227 |
-
|
228 |
-
// prevent calls to internal methods
|
229 |
-
if (isMethodCall && options.substring(0, 1) == '_') {
|
230 |
-
return this;
|
231 |
-
}
|
232 |
-
|
233 |
-
// handle getter methods
|
234 |
-
if (isMethodCall && getter(namespace, name, options, args)) {
|
235 |
-
var instance = jQuery.data(this[0], name);
|
236 |
-
return (instance ? instance[options].apply(instance, args)
|
237 |
-
: undefined);
|
238 |
-
}
|
239 |
-
|
240 |
-
// handle initialization and non-getter methods
|
241 |
-
return this.each(function() {
|
242 |
-
var instance = jQuery.data(this, name);
|
243 |
-
|
244 |
-
// constructor
|
245 |
-
(!instance && !isMethodCall &&
|
246 |
-
jQuery.data(this, name, new jQuery[namespace][name](this, options))._init());
|
247 |
-
|
248 |
-
// method call
|
249 |
-
(instance && isMethodCall && jQuery.isFunction(instance[options]) &&
|
250 |
-
instance[options].apply(instance, args));
|
251 |
-
});
|
252 |
-
};
|
253 |
-
|
254 |
-
// create widget constructor
|
255 |
-
jQuery[namespace] = jQuery[namespace] || {};
|
256 |
-
jQuery[namespace][name] = function(element, options) {
|
257 |
-
var self = this;
|
258 |
-
|
259 |
-
this.namespace = namespace;
|
260 |
-
this.widgetName = name;
|
261 |
-
this.widgetEventPrefix = jQuery[namespace][name].eventPrefix || name;
|
262 |
-
this.widgetBaseClass = namespace + '-' + name;
|
263 |
-
|
264 |
-
this.options = jQuery.extend({},
|
265 |
-
jQuery.widget.defaults,
|
266 |
-
jQuery[namespace][name].defaults,
|
267 |
-
jQuery.metadata && jQuery.metadata.get(element)[name],
|
268 |
-
options);
|
269 |
-
|
270 |
-
this.element = jQuery(element)
|
271 |
-
.bind('setData.' + name, function(event, key, value) {
|
272 |
-
if (event.target == element) {
|
273 |
-
return self._setData(key, value);
|
274 |
-
}
|
275 |
-
})
|
276 |
-
.bind('getData.' + name, function(event, key) {
|
277 |
-
if (event.target == element) {
|
278 |
-
return self._getData(key);
|
279 |
-
}
|
280 |
-
})
|
281 |
-
.bind('remove', function() {
|
282 |
-
return self.destroy();
|
283 |
-
});
|
284 |
-
};
|
285 |
-
|
286 |
-
// add widget prototype
|
287 |
-
jQuery[namespace][name].prototype = jQuery.extend({}, jQuery.widget.prototype, prototype);
|
288 |
-
|
289 |
-
// TODO: merge getter and getterSetter properties from widget prototype
|
290 |
-
// and plugin prototype
|
291 |
-
jQuery[namespace][name].getterSetter = 'option';
|
292 |
-
};
|
293 |
-
|
294 |
-
jQuery.widget.prototype = {
|
295 |
-
_init: function() {},
|
296 |
-
destroy: function() {
|
297 |
-
this.element.removeData(this.widgetName)
|
298 |
-
.removeClass(this.widgetBaseClass + '-disabled' + ' ' + this.namespace + '-state-disabled')
|
299 |
-
.removeAttr('aria-disabled');
|
300 |
-
},
|
301 |
-
|
302 |
-
option: function(key, value) {
|
303 |
-
var options = key,
|
304 |
-
self = this;
|
305 |
-
|
306 |
-
if (typeof key == "string") {
|
307 |
-
if (value === undefined) {
|
308 |
-
return this._getData(key);
|
309 |
-
}
|
310 |
-
options = {};
|
311 |
-
options[key] = value;
|
312 |
-
}
|
313 |
-
|
314 |
-
jQuery.each(options, function(key, value) {
|
315 |
-
self._setData(key, value);
|
316 |
-
});
|
317 |
-
},
|
318 |
-
_getData: function(key) {
|
319 |
-
return this.options[key];
|
320 |
-
},
|
321 |
-
_setData: function(key, value) {
|
322 |
-
this.options[key] = value;
|
323 |
-
|
324 |
-
if (key == 'disabled') {
|
325 |
-
this.element
|
326 |
-
[value ? 'addClass' : 'removeClass'](
|
327 |
-
this.widgetBaseClass + '-disabled' + ' ' +
|
328 |
-
this.namespace + '-state-disabled')
|
329 |
-
.attr("aria-disabled", value);
|
330 |
-
}
|
331 |
-
},
|
332 |
-
|
333 |
-
enable: function() {
|
334 |
-
this._setData('disabled', false);
|
335 |
-
},
|
336 |
-
disable: function() {
|
337 |
-
this._setData('disabled', true);
|
338 |
-
},
|
339 |
-
|
340 |
-
_trigger: function(type, event, data) {
|
341 |
-
var callback = this.options[type],
|
342 |
-
eventName = (type == this.widgetEventPrefix
|
343 |
-
? type : this.widgetEventPrefix + type);
|
344 |
-
|
345 |
-
event = jQuery.Event(event);
|
346 |
-
event.type = eventName;
|
347 |
-
|
348 |
-
// copy original event properties over to the new event
|
349 |
-
// this would happen if we could call jQuery.event.fix instead of jQuery.Event
|
350 |
-
// but we don't have a way to force an event to be fixed multiple times
|
351 |
-
if (event.originalEvent) {
|
352 |
-
for (var i = jQuery.event.props.length, prop; i;) {
|
353 |
-
prop = jQuery.event.props[--i];
|
354 |
-
event[prop] = event.originalEvent[prop];
|
355 |
-
}
|
356 |
-
}
|
357 |
-
|
358 |
-
this.element.trigger(event, data);
|
359 |
-
|
360 |
-
return !(jQuery.isFunction(callback) && callback.call(this.element[0], event, data) === false
|
361 |
-
|| event.isDefaultPrevented());
|
362 |
-
}
|
363 |
-
};
|
364 |
-
|
365 |
-
jQuery.widget.defaults = {
|
366 |
-
disabled: false
|
367 |
-
};
|
368 |
-
|
369 |
-
|
370 |
-
/** Mouse Interaction Plugin **/
|
371 |
-
|
372 |
-
jQuery.ui.mouse = {
|
373 |
-
_mouseInit: function() {
|
374 |
-
var self = this;
|
375 |
-
|
376 |
-
this.element
|
377 |
-
.bind('mousedown.'+this.widgetName, function(event) {
|
378 |
-
return self._mouseDown(event);
|
379 |
-
})
|
380 |
-
.bind('click.'+this.widgetName, function(event) {
|
381 |
-
if(self._preventClickEvent) {
|
382 |
-
self._preventClickEvent = false;
|
383 |
-
event.stopImmediatePropagation();
|
384 |
-
return false;
|
385 |
-
}
|
386 |
-
});
|
387 |
-
|
388 |
-
// Prevent text selection in IE
|
389 |
-
if (jQuery.browser.msie) {
|
390 |
-
this._mouseUnselectable = this.element.attr('unselectable');
|
391 |
-
this.element.attr('unselectable', 'on');
|
392 |
-
}
|
393 |
-
|
394 |
-
this.started = false;
|
395 |
-
},
|
396 |
-
|
397 |
-
// TODO: make sure destroying one instance of mouse doesn't mess with
|
398 |
-
// other instances of mouse
|
399 |
-
_mouseDestroy: function() {
|
400 |
-
this.element.unbind('.'+this.widgetName);
|
401 |
-
|
402 |
-
// Restore text selection in IE
|
403 |
-
(jQuery.browser.msie
|
404 |
-
&& this.element.attr('unselectable', this._mouseUnselectable));
|
405 |
-
},
|
406 |
-
|
407 |
-
_mouseDown: function(event) {
|
408 |
-
// don't let more than one widget handle mouseStart
|
409 |
-
// TODO: figure out why we have to use originalEvent
|
410 |
-
event.originalEvent = event.originalEvent || {};
|
411 |
-
if (event.originalEvent.mouseHandled) { return; }
|
412 |
-
|
413 |
-
// we may have missed mouseup (out of window)
|
414 |
-
(this._mouseStarted && this._mouseUp(event));
|
415 |
-
|
416 |
-
this._mouseDownEvent = event;
|
417 |
-
|
418 |
-
var self = this,
|
419 |
-
btnIsLeft = (event.which == 1),
|
420 |
-
elIsCancel = (typeof this.options.cancel == "string" ? jQuery(event.target).parents().add(event.target).filter(this.options.cancel).length : false);
|
421 |
-
if (!btnIsLeft || elIsCancel || !this._mouseCapture(event)) {
|
422 |
-
return true;
|
423 |
-
}
|
424 |
-
|
425 |
-
this.mouseDelayMet = !this.options.delay;
|
426 |
-
if (!this.mouseDelayMet) {
|
427 |
-
this._mouseDelayTimer = setTimeout(function() {
|
428 |
-
self.mouseDelayMet = true;
|
429 |
-
}, this.options.delay);
|
430 |
-
}
|
431 |
-
|
432 |
-
if (this._mouseDistanceMet(event) && this._mouseDelayMet(event)) {
|
433 |
-
this._mouseStarted = (this._mouseStart(event) !== false);
|
434 |
-
if (!this._mouseStarted) {
|
435 |
-
event.preventDefault();
|
436 |
-
return true;
|
437 |
-
}
|
438 |
-
}
|
439 |
-
|
440 |
-
// these delegates are required to keep context
|
441 |
-
this._mouseMoveDelegate = function(event) {
|
442 |
-
return self._mouseMove(event);
|
443 |
-
};
|
444 |
-
this._mouseUpDelegate = function(event) {
|
445 |
-
return self._mouseUp(event);
|
446 |
-
};
|
447 |
-
jQuery(document)
|
448 |
-
.bind('mousemove.'+this.widgetName, this._mouseMoveDelegate)
|
449 |
-
.bind('mouseup.'+this.widgetName, this._mouseUpDelegate);
|
450 |
-
|
451 |
-
// preventDefault() is used to prevent the selection of text here -
|
452 |
-
// however, in Safari, this causes select boxes not to be selectable
|
453 |
-
// anymore, so this fix is needed
|
454 |
-
(jQuery.browser.safari || event.preventDefault());
|
455 |
-
|
456 |
-
event.originalEvent.mouseHandled = true;
|
457 |
-
return true;
|
458 |
-
},
|
459 |
-
|
460 |
-
_mouseMove: function(event) {
|
461 |
-
// IE mouseup check - mouseup happened when mouse was out of window
|
462 |
-
if (jQuery.browser.msie && !event.button) {
|
463 |
-
return this._mouseUp(event);
|
464 |
-
}
|
465 |
-
|
466 |
-
if (this._mouseStarted) {
|
467 |
-
this._mouseDrag(event);
|
468 |
-
return event.preventDefault();
|
469 |
-
}
|
470 |
-
|
471 |
-
if (this._mouseDistanceMet(event) && this._mouseDelayMet(event)) {
|
472 |
-
this._mouseStarted =
|
473 |
-
(this._mouseStart(this._mouseDownEvent, event) !== false);
|
474 |
-
(this._mouseStarted ? this._mouseDrag(event) : this._mouseUp(event));
|
475 |
-
}
|
476 |
-
|
477 |
-
return !this._mouseStarted;
|
478 |
-
},
|
479 |
-
|
480 |
-
_mouseUp: function(event) {
|
481 |
-
jQuery(document)
|
482 |
-
.unbind('mousemove.'+this.widgetName, this._mouseMoveDelegate)
|
483 |
-
.unbind('mouseup.'+this.widgetName, this._mouseUpDelegate);
|
484 |
-
|
485 |
-
if (this._mouseStarted) {
|
486 |
-
this._mouseStarted = false;
|
487 |
-
this._preventClickEvent = (event.target == this._mouseDownEvent.target);
|
488 |
-
this._mouseStop(event);
|
489 |
-
}
|
490 |
-
|
491 |
-
return false;
|
492 |
-
},
|
493 |
-
|
494 |
-
_mouseDistanceMet: function(event) {
|
495 |
-
return (Math.max(
|
496 |
-
Math.abs(this._mouseDownEvent.pageX - event.pageX),
|
497 |
-
Math.abs(this._mouseDownEvent.pageY - event.pageY)
|
498 |
-
) >= this.options.distance
|
499 |
-
);
|
500 |
-
},
|
501 |
-
|
502 |
-
_mouseDelayMet: function(event) {
|
503 |
-
return this.mouseDelayMet;
|
504 |
-
},
|
505 |
-
|
506 |
-
// These are placeholder methods, to be overriden by extending plugin
|
507 |
-
_mouseStart: function(event) {},
|
508 |
-
_mouseDrag: function(event) {},
|
509 |
-
_mouseStop: function(event) {},
|
510 |
-
_mouseCapture: function(event) { return true; }
|
511 |
-
};
|
512 |
-
|
513 |
-
jQuery.ui.mouse.defaults = {
|
514 |
-
cancel: null,
|
515 |
-
distance: 1,
|
516 |
-
delay: 0
|
517 |
-
};
|
518 |
-
|
519 |
-
})(jQuery);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lib/ui.draggable.js
DELETED
@@ -1,773 +0,0 @@
|
|
1 |
-
/*
|
2 |
-
* jQuery UI Draggable 1.7.2
|
3 |
-
*
|
4 |
-
* Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
|
5 |
-
* Dual licensed under the MIT (MIT-LICENSE.txt)
|
6 |
-
* and GPL (GPL-LICENSE.txt) licenses.
|
7 |
-
*
|
8 |
-
* http://docs.jquery.com/UI/Draggables
|
9 |
-
*
|
10 |
-
* Depends:
|
11 |
-
* ui.core.js
|
12 |
-
*/
|
13 |
-
(function(jQuery) {
|
14 |
-
|
15 |
-
jQuery.widget("ui.draggable", jQuery.extend({}, jQuery.ui.mouse, {
|
16 |
-
|
17 |
-
_init: function() {
|
18 |
-
|
19 |
-
if (this.options.helper == 'original' && !(/^(?:r|a|f)/).test(this.element.css("position")))
|
20 |
-
this.element[0].style.position = 'relative';
|
21 |
-
|
22 |
-
(this.options.addClasses && this.element.addClass("ui-draggable"));
|
23 |
-
(this.options.disabled && this.element.addClass("ui-draggable-disabled"));
|
24 |
-
|
25 |
-
this._mouseInit();
|
26 |
-
|
27 |
-
},
|
28 |
-
|
29 |
-
destroy: function() {
|
30 |
-
if(!this.element.data('draggable')) return;
|
31 |
-
this.element
|
32 |
-
.removeData("draggable")
|
33 |
-
.unbind(".draggable")
|
34 |
-
.removeClass("ui-draggable"
|
35 |
-
+ " ui-draggable-dragging"
|
36 |
-
+ " ui-draggable-disabled");
|
37 |
-
this._mouseDestroy();
|
38 |
-
},
|
39 |
-
|
40 |
-
_mouseCapture: function(event) {
|
41 |
-
|
42 |
-
var o = this.options;
|
43 |
-
|
44 |
-
if (this.helper || o.disabled || jQuery(event.target).is('.ui-resizable-handle'))
|
45 |
-
return false;
|
46 |
-
|
47 |
-
//Quit if we're not on a valid handle
|
48 |
-
this.handle = this._getHandle(event);
|
49 |
-
if (!this.handle)
|
50 |
-
return false;
|
51 |
-
|
52 |
-
return true;
|
53 |
-
|
54 |
-
},
|
55 |
-
|
56 |
-
_mouseStart: function(event) {
|
57 |
-
|
58 |
-
var o = this.options;
|
59 |
-
|
60 |
-
//Create and append the visible helper
|
61 |
-
this.helper = this._createHelper(event);
|
62 |
-
|
63 |
-
//Cache the helper size
|
64 |
-
this._cacheHelperProportions();
|
65 |
-
|
66 |
-
//If ddmanager is used for droppables, set the global draggable
|
67 |
-
if(jQuery.ui.ddmanager)
|
68 |
-
jQuery.ui.ddmanager.current = this;
|
69 |
-
|
70 |
-
/*
|
71 |
-
* - Position generation -
|
72 |
-
* This block generates everything position related - it's the core of draggables.
|
73 |
-
*/
|
74 |
-
|
75 |
-
//Cache the margins of the original element
|
76 |
-
this._cacheMargins();
|
77 |
-
|
78 |
-
//Store the helper's css position
|
79 |
-
this.cssPosition = this.helper.css("position");
|
80 |
-
this.scrollParent = this.helper.scrollParent();
|
81 |
-
|
82 |
-
//The element's absolute position on the page minus margins
|
83 |
-
this.offset = this.element.offset();
|
84 |
-
this.offset = {
|
85 |
-
top: this.offset.top - this.margins.top,
|
86 |
-
left: this.offset.left - this.margins.left
|
87 |
-
};
|
88 |
-
|
89 |
-
jQuery.extend(this.offset, {
|
90 |
-
click: { //Where the click happened, relative to the element
|
91 |
-
left: event.pageX - this.offset.left,
|
92 |
-
top: event.pageY - this.offset.top
|
93 |
-
},
|
94 |
-
parent: this._getParentOffset(),
|
95 |
-
relative: this._getRelativeOffset() //This is a relative to absolute position minus the actual position calculation - only used for relative positioned helper
|
96 |
-
});
|
97 |
-
|
98 |
-
//Generate the original position
|
99 |
-
this.originalPosition = this._generatePosition(event);
|
100 |
-
this.originalPageX = event.pageX;
|
101 |
-
this.originalPageY = event.pageY;
|
102 |
-
|
103 |
-
//Adjust the mouse offset relative to the helper if 'cursorAt' is supplied
|
104 |
-
if(o.cursorAt)
|
105 |
-
this._adjustOffsetFromHelper(o.cursorAt);
|
106 |
-
|
107 |
-
//Set a containment if given in the options
|
108 |
-
if(o.containment)
|
109 |
-
this._setContainment();
|
110 |
-
|
111 |
-
//Call plugins and callbacks
|
112 |
-
this._trigger("start", event);
|
113 |
-
|
114 |
-
//Recache the helper size
|
115 |
-
this._cacheHelperProportions();
|
116 |
-
|
117 |
-
//Prepare the droppable offsets
|
118 |
-
if (jQuery.ui.ddmanager && !o.dropBehaviour)
|
119 |
-
jQuery.ui.ddmanager.prepareOffsets(this, event);
|
120 |
-
|
121 |
-
this.helper.addClass("ui-draggable-dragging");
|
122 |
-
this._mouseDrag(event, true); //Execute the drag once - this causes the helper not to be visible before getting its correct position
|
123 |
-
return true;
|
124 |
-
},
|
125 |
-
|
126 |
-
_mouseDrag: function(event, noPropagation) {
|
127 |
-
|
128 |
-
//Compute the helpers position
|
129 |
-
this.position = this._generatePosition(event);
|
130 |
-
this.positionAbs = this._convertPositionTo("absolute");
|
131 |
-
|
132 |
-
//Call plugins and callbacks and use the resulting position if something is returned
|
133 |
-
if (!noPropagation) {
|
134 |
-
var ui = this._uiHash();
|
135 |
-
this._trigger('drag', event, ui);
|
136 |
-
this.position = ui.position;
|
137 |
-
}
|
138 |
-
|
139 |
-
if(!this.options.axis || this.options.axis != "y") this.helper[0].style.left = this.position.left+'px';
|
140 |
-
if(!this.options.axis || this.options.axis != "x") this.helper[0].style.top = this.position.top+'px';
|
141 |
-
if(jQuery.ui.ddmanager) jQuery.ui.ddmanager.drag(this, event);
|
142 |
-
|
143 |
-
return false;
|
144 |
-
},
|
145 |
-
|
146 |
-
_mouseStop: function(event) {
|
147 |
-
|
148 |
-
//If we are using droppables, inform the manager about the drop
|
149 |
-
var dropped = false;
|
150 |
-
if (jQuery.ui.ddmanager && !this.options.dropBehaviour)
|
151 |
-
dropped = jQuery.ui.ddmanager.drop(this, event);
|
152 |
-
|
153 |
-
//if a drop comes from outside (a sortable)
|
154 |
-
if(this.dropped) {
|
155 |
-
dropped = this.dropped;
|
156 |
-
this.dropped = false;
|
157 |
-
}
|
158 |
-
|
159 |
-
if((this.options.revert == "invalid" && !dropped) || (this.options.revert == "valid" && dropped) || this.options.revert === true || (jQuery.isFunction(this.options.revert) && this.options.revert.call(this.element, dropped))) {
|
160 |
-
var self = this;
|
161 |
-
jQuery(this.helper).animate(this.originalPosition, parseInt(this.options.revertDuration, 10), function() {
|
162 |
-
self._trigger("stop", event);
|
163 |
-
self._clear();
|
164 |
-
});
|
165 |
-
} else {
|
166 |
-
this._trigger("stop", event);
|
167 |
-
this._clear();
|
168 |
-
}
|
169 |
-
|
170 |
-
return false;
|
171 |
-
},
|
172 |
-
|
173 |
-
_getHandle: function(event) {
|
174 |
-
|
175 |
-
var handle = !this.options.handle || !jQuery(this.options.handle, this.element).length ? true : false;
|
176 |
-
jQuery(this.options.handle, this.element)
|
177 |
-
.find("*")
|
178 |
-
.andSelf()
|
179 |
-
.each(function() {
|
180 |
-
if(this == event.target) handle = true;
|
181 |
-
});
|
182 |
-
|
183 |
-
return handle;
|
184 |
-
|
185 |
-
},
|
186 |
-
|
187 |
-
_createHelper: function(event) {
|
188 |
-
|
189 |
-
var o = this.options;
|
190 |
-
var helper = jQuery.isFunction(o.helper) ? jQuery(o.helper.apply(this.element[0], [event])) : (o.helper == 'clone' ? this.element.clone() : this.element);
|
191 |
-
|
192 |
-
if(!helper.parents('body').length)
|
193 |
-
helper.appendTo((o.appendTo == 'parent' ? this.element[0].parentNode : o.appendTo));
|
194 |
-
|
195 |
-
if(helper[0] != this.element[0] && !(/(fixed|absolute)/).test(helper.css("position")))
|
196 |
-
helper.css("position", "absolute");
|
197 |
-
|
198 |
-
return helper;
|
199 |
-
|
200 |
-
},
|
201 |
-
|
202 |
-
_adjustOffsetFromHelper: function(obj) {
|
203 |
-
if(obj.left != undefined) this.offset.click.left = obj.left + this.margins.left;
|
204 |
-
if(obj.right != undefined) this.offset.click.left = this.helperProportions.width - obj.right + this.margins.left;
|
205 |
-
if(obj.top != undefined) this.offset.click.top = obj.top + this.margins.top;
|
206 |
-
if(obj.bottom != undefined) this.offset.click.top = this.helperProportions.height - obj.bottom + this.margins.top;
|
207 |
-
},
|
208 |
-
|
209 |
-
_getParentOffset: function() {
|
210 |
-
|
211 |
-
//Get the offsetParent and cache its position
|
212 |
-
this.offsetParent = this.helper.offsetParent();
|
213 |
-
var po = this.offsetParent.offset();
|
214 |
-
|
215 |
-
// This is a special case where we need to modify a offset calculated on start, since the following happened:
|
216 |
-
// 1. The position of the helper is absolute, so it's position is calculated based on the next positioned parent
|
217 |
-
// 2. The actual offset parent is a child of the scroll parent, and the scroll parent isn't the document, which means that
|
218 |
-
// the scroll is included in the initial calculation of the offset of the parent, and never recalculated upon drag
|
219 |
-
if(this.cssPosition == 'absolute' && this.scrollParent[0] != document && jQuery.ui.contains(this.scrollParent[0], this.offsetParent[0])) {
|
220 |
-
po.left += this.scrollParent.scrollLeft();
|
221 |
-
po.top += this.scrollParent.scrollTop();
|
222 |
-
}
|
223 |
-
|
224 |
-
if((this.offsetParent[0] == document.body) //This needs to be actually done for all browsers, since pageX/pageY includes this information
|
225 |
-
|| (this.offsetParent[0].tagName && this.offsetParent[0].tagName.toLowerCase() == 'html' && jQuery.browser.msie)) //Ugly IE fix
|
226 |
-
po = { top: 0, left: 0 };
|
227 |
-
|
228 |
-
return {
|
229 |
-
top: po.top + (parseInt(this.offsetParent.css("borderTopWidth"),10) || 0),
|
230 |
-
left: po.left + (parseInt(this.offsetParent.css("borderLeftWidth"),10) || 0)
|
231 |
-
};
|
232 |
-
|
233 |
-
},
|
234 |
-
|
235 |
-
_getRelativeOffset: function() {
|
236 |
-
|
237 |
-
if(this.cssPosition == "relative") {
|
238 |
-
var p = this.element.position();
|
239 |
-
return {
|
240 |
-
top: p.top - (parseInt(this.helper.css("top"),10) || 0) + this.scrollParent.scrollTop(),
|
241 |
-
left: p.left - (parseInt(this.helper.css("left"),10) || 0) + this.scrollParent.scrollLeft()
|
242 |
-
};
|
243 |
-
} else {
|
244 |
-
return { top: 0, left: 0 };
|
245 |
-
}
|
246 |
-
|
247 |
-
},
|
248 |
-
|
249 |
-
_cacheMargins: function() {
|
250 |
-
this.margins = {
|
251 |
-
left: (parseInt(this.element.css("marginLeft"),10) || 0),
|
252 |
-
top: (parseInt(this.element.css("marginTop"),10) || 0)
|
253 |
-
};
|
254 |
-
},
|
255 |
-
|
256 |
-
_cacheHelperProportions: function() {
|
257 |
-
this.helperProportions = {
|
258 |
-
width: this.helper.outerWidth(),
|
259 |
-
height: this.helper.outerHeight()
|
260 |
-
};
|
261 |
-
},
|
262 |
-
|
263 |
-
_setContainment: function() {
|
264 |
-
|
265 |
-
var o = this.options;
|
266 |
-
if(o.containment == 'parent') o.containment = this.helper[0].parentNode;
|
267 |
-
if(o.containment == 'document' || o.containment == 'window') this.containment = [
|
268 |
-
0 - this.offset.relative.left - this.offset.parent.left,
|
269 |
-
0 - this.offset.relative.top - this.offset.parent.top,
|
270 |
-
jQuery(o.containment == 'document' ? document : window).width() - this.helperProportions.width - this.margins.left,
|
271 |
-
(jQuery(o.containment == 'document' ? document : window).height() || document.body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top
|
272 |
-
];
|
273 |
-
|
274 |
-
if(!(/^(document|window|parent)jQuery/).test(o.containment) && o.containment.constructor != Array) {
|
275 |
-
var ce = jQuery(o.containment)[0]; if(!ce) return;
|
276 |
-
var co = jQuery(o.containment).offset();
|
277 |
-
var over = (jQuery(ce).css("overflow") != 'hidden');
|
278 |
-
|
279 |
-
this.containment = [
|
280 |
-
co.left + (parseInt(jQuery(ce).css("borderLeftWidth"),10) || 0) + (parseInt(jQuery(ce).css("paddingLeft"),10) || 0) - this.margins.left,
|
281 |
-
co.top + (parseInt(jQuery(ce).css("borderTopWidth"),10) || 0) + (parseInt(jQuery(ce).css("paddingTop"),10) || 0) - this.margins.top,
|
282 |
-
co.left+(over ? Math.max(ce.scrollWidth,ce.offsetWidth) : ce.offsetWidth) - (parseInt(jQuery(ce).css("borderLeftWidth"),10) || 0) - (parseInt(jQuery(ce).css("paddingRight"),10) || 0) - this.helperProportions.width - this.margins.left,
|
283 |
-
co.top+(over ? Math.max(ce.scrollHeight,ce.offsetHeight) : ce.offsetHeight) - (parseInt(jQuery(ce).css("borderTopWidth"),10) || 0) - (parseInt(jQuery(ce).css("paddingBottom"),10) || 0) - this.helperProportions.height - this.margins.top
|
284 |
-
];
|
285 |
-
} else if(o.containment.constructor == Array) {
|
286 |
-
this.containment = o.containment;
|
287 |
-
}
|
288 |
-
|
289 |
-
},
|
290 |
-
|
291 |
-
_convertPositionTo: function(d, pos) {
|
292 |
-
|
293 |
-
if(!pos) pos = this.position;
|
294 |
-
var mod = d == "absolute" ? 1 : -1;
|
295 |
-
var o = this.options, scroll = this.cssPosition == 'absolute' && !(this.scrollParent[0] != document && jQuery.ui.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName);
|
296 |
-
|
297 |
-
return {
|
298 |
-
top: (
|
299 |
-
pos.top // The absolute mouse position
|
300 |
-
+ this.offset.relative.top * mod // Only for relative positioned nodes: Relative offset from element to offset parent
|
301 |
-
+ this.offset.parent.top * mod // The offsetParent's offset without borders (offset + border)
|
302 |
-
- (jQuery.browser.safari && this.cssPosition == 'fixed' ? 0 : ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ) * mod)
|
303 |
-
),
|
304 |
-
left: (
|
305 |
-
pos.left // The absolute mouse position
|
306 |
-
+ this.offset.relative.left * mod // Only for relative positioned nodes: Relative offset from element to offset parent
|
307 |
-
+ this.offset.parent.left * mod // The offsetParent's offset without borders (offset + border)
|
308 |
-
- (jQuery.browser.safari && this.cssPosition == 'fixed' ? 0 : ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ) * mod)
|
309 |
-
)
|
310 |
-
};
|
311 |
-
|
312 |
-
},
|
313 |
-
|
314 |
-
_generatePosition: function(event) {
|
315 |
-
|
316 |
-
var o = this.options, scroll = this.cssPosition == 'absolute' && !(this.scrollParent[0] != document && jQuery.ui.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName);
|
317 |
-
|
318 |
-
// This is another very weird special case that only happens for relative elements:
|
319 |
-
// 1. If the css position is relative
|
320 |
-
// 2. and the scroll parent is the document or similar to the offset parent
|
321 |
-
// we have to refresh the relative offset during the scroll so there are no jumps
|
322 |
-
if(this.cssPosition == 'relative' && !(this.scrollParent[0] != document && this.scrollParent[0] != this.offsetParent[0])) {
|
323 |
-
this.offset.relative = this._getRelativeOffset();
|
324 |
-
}
|
325 |
-
|
326 |
-
var pageX = event.pageX;
|
327 |
-
var pageY = event.pageY;
|
328 |
-
|
329 |
-
/*
|
330 |
-
* - Position constraining -
|
331 |
-
* Constrain the position to a mix of grid, containment.
|
332 |
-
*/
|
333 |
-
|
334 |
-
if(this.originalPosition) { //If we are not dragging yet, we won't check for options
|
335 |
-
|
336 |
-
if(this.containment) {
|
337 |
-
if(event.pageX - this.offset.click.left < this.containment[0]) pageX = this.containment[0] + this.offset.click.left;
|
338 |
-
if(event.pageY - this.offset.click.top < this.containment[1]) pageY = this.containment[1] + this.offset.click.top;
|
339 |
-
if(event.pageX - this.offset.click.left > this.containment[2]) pageX = this.containment[2] + this.offset.click.left;
|
340 |
-
if(event.pageY - this.offset.click.top > this.containment[3]) pageY = this.containment[3] + this.offset.click.top;
|
341 |
-
}
|
342 |
-
|
343 |
-
if(o.grid) {
|
344 |
-
var top = this.originalPageY + Math.round((pageY - this.originalPageY) / o.grid[1]) * o.grid[1];
|
345 |
-
pageY = this.containment ? (!(top - this.offset.click.top < this.containment[1] || top - this.offset.click.top > this.containment[3]) ? top : (!(top - this.offset.click.top < this.containment[1]) ? top - o.grid[1] : top + o.grid[1])) : top;
|
346 |
-
|
347 |
-
var left = this.originalPageX + Math.round((pageX - this.originalPageX) / o.grid[0]) * o.grid[0];
|
348 |
-
pageX = this.containment ? (!(left - this.offset.click.left < this.containment[0] || left - this.offset.click.left > this.containment[2]) ? left : (!(left - this.offset.click.left < this.containment[0]) ? left - o.grid[0] : left + o.grid[0])) : left;
|
349 |
-
}
|
350 |
-
|
351 |
-
}
|
352 |
-
|
353 |
-
return {
|
354 |
-
top: (
|
355 |
-
pageY // The absolute mouse position
|
356 |
-
- this.offset.click.top // Click offset (relative to the element)
|
357 |
-
- this.offset.relative.top // Only for relative positioned nodes: Relative offset from element to offset parent
|
358 |
-
- this.offset.parent.top // The offsetParent's offset without borders (offset + border)
|
359 |
-
+ (jQuery.browser.safari && this.cssPosition == 'fixed' ? 0 : ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ))
|
360 |
-
),
|
361 |
-
left: (
|
362 |
-
pageX // The absolute mouse position
|
363 |
-
- this.offset.click.left // Click offset (relative to the element)
|
364 |
-
- this.offset.relative.left // Only for relative positioned nodes: Relative offset from element to offset parent
|
365 |
-
- this.offset.parent.left // The offsetParent's offset without borders (offset + border)
|
366 |
-
+ (jQuery.browser.safari && this.cssPosition == 'fixed' ? 0 : ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ))
|
367 |
-
)
|
368 |
-
};
|
369 |
-
|
370 |
-
},
|
371 |
-
|
372 |
-
_clear: function() {
|
373 |
-
this.helper.removeClass("ui-draggable-dragging");
|
374 |
-
if(this.helper[0] != this.element[0] && !this.cancelHelperRemoval) this.helper.remove();
|
375 |
-
//if(jQuery.ui.ddmanager) jQuery.ui.ddmanager.current = null;
|
376 |
-
this.helper = null;
|
377 |
-
this.cancelHelperRemoval = false;
|
378 |
-
},
|
379 |
-
|
380 |
-
// From now on bulk stuff - mainly helpers
|
381 |
-
|
382 |
-
_trigger: function(type, event, ui) {
|
383 |
-
ui = ui || this._uiHash();
|
384 |
-
jQuery.ui.plugin.call(this, type, [event, ui]);
|
385 |
-
if(type == "drag") this.positionAbs = this._convertPositionTo("absolute"); //The absolute position has to be recalculated after plugins
|
386 |
-
return jQuery.widget.prototype._trigger.call(this, type, event, ui);
|
387 |
-
},
|
388 |
-
|
389 |
-
plugins: {},
|
390 |
-
|
391 |
-
_uiHash: function(event) {
|
392 |
-
return {
|
393 |
-
helper: this.helper,
|
394 |
-
position: this.position,
|
395 |
-
absolutePosition: this.positionAbs, //deprecated
|
396 |
-
offset: this.positionAbs
|
397 |
-
};
|
398 |
-
}
|
399 |
-
|
400 |
-
}));
|
401 |
-
|
402 |
-
jQuery.extend(jQuery.ui.draggable, {
|
403 |
-
version: "1.7.2",
|
404 |
-
eventPrefix: "drag",
|
405 |
-
defaults: {
|
406 |
-
addClasses: true,
|
407 |
-
appendTo: "parent",
|
408 |
-
axis: false,
|
409 |
-
cancel: ":input,option",
|
410 |
-
connectToSortable: false,
|
411 |
-
containment: false,
|
412 |
-
cursor: "auto",
|
413 |
-
cursorAt: false,
|
414 |
-
delay: 0,
|
415 |
-
distance: 1,
|
416 |
-
grid: false,
|
417 |
-
handle: false,
|
418 |
-
helper: "original",
|
419 |
-
iframeFix: false,
|
420 |
-
opacity: false,
|
421 |
-
refreshPositions: false,
|
422 |
-
revert: false,
|
423 |
-
revertDuration: 500,
|
424 |
-
scope: "default",
|
425 |
-
scroll: true,
|
426 |
-
scrollSensitivity: 20,
|
427 |
-
scrollSpeed: 20,
|
428 |
-
snap: false,
|
429 |
-
snapMode: "both",
|
430 |
-
snapTolerance: 20,
|
431 |
-
stack: false,
|
432 |
-
zIndex: false
|
433 |
-
}
|
434 |
-
});
|
435 |
-
|
436 |
-
jQuery.ui.plugin.add("draggable", "connectToSortable", {
|
437 |
-
start: function(event, ui) {
|
438 |
-
|
439 |
-
var inst = jQuery(this).data("draggable"), o = inst.options,
|
440 |
-
uiSortable = jQuery.extend({}, ui, { item: inst.element });
|
441 |
-
inst.sortables = [];
|
442 |
-
jQuery(o.connectToSortable).each(function() {
|
443 |
-
var sortable = jQuery.data(this, 'sortable');
|
444 |
-
if (sortable && !sortable.options.disabled) {
|
445 |
-
inst.sortables.push({
|
446 |
-
instance: sortable,
|
447 |
-
shouldRevert: sortable.options.revert
|
448 |
-
});
|
449 |
-
sortable._refreshItems(); //Do a one-time refresh at start to refresh the containerCache
|
450 |
-
sortable._trigger("activate", event, uiSortable);
|
451 |
-
}
|
452 |
-
});
|
453 |
-
|
454 |
-
},
|
455 |
-
stop: function(event, ui) {
|
456 |
-
|
457 |
-
//If we are still over the sortable, we fake the stop event of the sortable, but also remove helper
|
458 |
-
var inst = jQuery(this).data("draggable"),
|
459 |
-
uiSortable = jQuery.extend({}, ui, { item: inst.element });
|
460 |
-
|
461 |
-
jQuery.each(inst.sortables, function() {
|
462 |
-
if(this.instance.isOver) {
|
463 |
-
|
464 |
-
this.instance.isOver = 0;
|
465 |
-
|
466 |
-
inst.cancelHelperRemoval = true; //Don't remove the helper in the draggable instance
|
467 |
-
this.instance.cancelHelperRemoval = false; //Remove it in the sortable instance (so sortable plugins like revert still work)
|
468 |
-
|
469 |
-
//The sortable revert is supported, and we have to set a temporary dropped variable on the draggable to support revert: 'valid/invalid'
|
470 |
-
if(this.shouldRevert) this.instance.options.revert = true;
|
471 |
-
|
472 |
-
//Trigger the stop of the sortable
|
473 |
-
this.instance._mouseStop(event);
|
474 |
-
|
475 |
-
this.instance.options.helper = this.instance.options._helper;
|
476 |
-
|
477 |
-
//If the helper has been the original item, restore properties in the sortable
|
478 |
-
if(inst.options.helper == 'original')
|
479 |
-
this.instance.currentItem.css({ top: 'auto', left: 'auto' });
|
480 |
-
|
481 |
-
} else {
|
482 |
-
this.instance.cancelHelperRemoval = false; //Remove the helper in the sortable instance
|
483 |
-
this.instance._trigger("deactivate", event, uiSortable);
|
484 |
-
}
|
485 |
-
|
486 |
-
});
|
487 |
-
|
488 |
-
},
|
489 |
-
drag: function(event, ui) {
|
490 |
-
|
491 |
-
var inst = jQuery(this).data("draggable"), self = this;
|
492 |
-
|
493 |
-
var checkPos = function(o) {
|
494 |
-
var dyClick = this.offset.click.top, dxClick = this.offset.click.left;
|
495 |
-
var helperTop = this.positionAbs.top, helperLeft = this.positionAbs.left;
|
496 |
-
var itemHeight = o.height, itemWidth = o.width;
|
497 |
-
var itemTop = o.top, itemLeft = o.left;
|
498 |
-
|
499 |
-
return jQuery.ui.isOver(helperTop + dyClick, helperLeft + dxClick, itemTop, itemLeft, itemHeight, itemWidth);
|
500 |
-
};
|
501 |
-
|
502 |
-
jQuery.each(inst.sortables, function(i) {
|
503 |
-
|
504 |
-
//Copy over some variables to allow calling the sortable's native _intersectsWith
|
505 |
-
this.instance.positionAbs = inst.positionAbs;
|
506 |
-
this.instance.helperProportions = inst.helperProportions;
|
507 |
-
this.instance.offset.click = inst.offset.click;
|
508 |
-
|
509 |
-
if(this.instance._intersectsWith(this.instance.containerCache)) {
|
510 |
-
|
511 |
-
//If it intersects, we use a little isOver variable and set it once, so our move-in stuff gets fired only once
|
512 |
-
if(!this.instance.isOver) {
|
513 |
-
|
514 |
-
this.instance.isOver = 1;
|
515 |
-
//Now we fake the start of dragging for the sortable instance,
|
516 |
-
//by cloning the list group item, appending it to the sortable and using it as inst.currentItem
|
517 |
-
//We can then fire the start event of the sortable with our passed browser event, and our own helper (so it doesn't create a new one)
|
518 |
-
this.instance.currentItem = jQuery(self).clone().appendTo(this.instance.element).data("sortable-item", true);
|
519 |
-
this.instance.options._helper = this.instance.options.helper; //Store helper option to later restore it
|
520 |
-
this.instance.options.helper = function() { return ui.helper[0]; };
|
521 |
-
|
522 |
-
event.target = this.instance.currentItem[0];
|
523 |
-
this.instance._mouseCapture(event, true);
|
524 |
-
this.instance._mouseStart(event, true, true);
|
525 |
-
|
526 |
-
//Because the browser event is way off the new appended portlet, we modify a couple of variables to reflect the changes
|
527 |
-
this.instance.offset.click.top = inst.offset.click.top;
|
528 |
-
this.instance.offset.click.left = inst.offset.click.left;
|
529 |
-
this.instance.offset.parent.left -= inst.offset.parent.left - this.instance.offset.parent.left;
|
530 |
-
this.instance.offset.parent.top -= inst.offset.parent.top - this.instance.offset.parent.top;
|
531 |
-
|
532 |
-
inst._trigger("toSortable", event);
|
533 |
-
inst.dropped = this.instance.element; //draggable revert needs that
|
534 |
-
//hack so receive/update callbacks work (mostly)
|
535 |
-
inst.currentItem = inst.element;
|
536 |
-
this.instance.fromOutside = inst;
|
537 |
-
|
538 |
-
}
|
539 |
-
|
540 |
-
//Provided we did all the previous steps, we can fire the drag event of the sortable on every draggable drag, when it intersects with the sortable
|
541 |
-
if(this.instance.currentItem) this.instance._mouseDrag(event);
|
542 |
-
|
543 |
-
} else {
|
544 |
-
|
545 |
-
//If it doesn't intersect with the sortable, and it intersected before,
|
546 |
-
//we fake the drag stop of the sortable, but make sure it doesn't remove the helper by using cancelHelperRemoval
|
547 |
-
if(this.instance.isOver) {
|
548 |
-
|
549 |
-
this.instance.isOver = 0;
|
550 |
-
this.instance.cancelHelperRemoval = true;
|
551 |
-
|
552 |
-
//Prevent reverting on this forced stop
|
553 |
-
this.instance.options.revert = false;
|
554 |
-
|
555 |
-
// The out event needs to be triggered independently
|
556 |
-
this.instance._trigger('out', event, this.instance._uiHash(this.instance));
|
557 |
-
|
558 |
-
this.instance._mouseStop(event, true);
|
559 |
-
this.instance.options.helper = this.instance.options._helper;
|
560 |
-
|
561 |
-
//Now we remove our currentItem, the list group clone again, and the placeholder, and animate the helper back to it's original size
|
562 |
-
this.instance.currentItem.remove();
|
563 |
-
if(this.instance.placeholder) this.instance.placeholder.remove();
|
564 |
-
|
565 |
-
inst._trigger("fromSortable", event);
|
566 |
-
inst.dropped = false; //draggable revert needs that
|
567 |
-
}
|
568 |
-
|
569 |
-
};
|
570 |
-
|
571 |
-
});
|
572 |
-
|
573 |
-
}
|
574 |
-
});
|
575 |
-
|
576 |
-
jQuery.ui.plugin.add("draggable", "cursor", {
|
577 |
-
start: function(event, ui) {
|
578 |
-
var t = jQuery('body'), o = jQuery(this).data('draggable').options;
|
579 |
-
if (t.css("cursor")) o._cursor = t.css("cursor");
|
580 |
-
t.css("cursor", o.cursor);
|
581 |
-
},
|
582 |
-
stop: function(event, ui) {
|
583 |
-
/*
|
584 |
-
* ZTG - Firefox and Chrome and fine with this, but
|
585 |
-
* IE throws an error when we try access the draggable
|
586 |
-
* options. This is just a safety precaution.
|
587 |
-
*/
|
588 |
-
if(jQuery(this).data('draggable')) {
|
589 |
-
var o = jQuery(this).data('draggable').options;
|
590 |
-
if (o._cursor) jQuery('body').css("cursor", o._cursor);
|
591 |
-
}
|
592 |
-
}
|
593 |
-
});
|
594 |
-
|
595 |
-
jQuery.ui.plugin.add("draggable", "iframeFix", {
|
596 |
-
start: function(event, ui) {
|
597 |
-
var o = jQuery(this).data('draggable').options;
|
598 |
-
jQuery(o.iframeFix === true ? "iframe" : o.iframeFix).each(function() {
|
599 |
-
jQuery('<div class="ui-draggable-iframeFix" style="background: #fff;"></div>')
|
600 |
-
.css({
|
601 |
-
width: this.offsetWidth+"px", height: this.offsetHeight+"px",
|
602 |
-
position: "absolute", opacity: "0.001", zIndex: 1000
|
603 |
-
})
|
604 |
-
.css(jQuery(this).offset())
|
605 |
-
.appendTo("body");
|
606 |
-
});
|
607 |
-
},
|
608 |
-
stop: function(event, ui) {
|
609 |
-
jQuery("div.ui-draggable-iframeFix").each(function() { this.parentNode.removeChild(this); }); //Remove frame helpers
|
610 |
-
}
|
611 |
-
});
|
612 |
-
|
613 |
-
jQuery.ui.plugin.add("draggable", "opacity", {
|
614 |
-
start: function(event, ui) {
|
615 |
-
var t = jQuery(ui.helper), o = jQuery(this).data('draggable').options;
|
616 |
-
if(t.css("opacity")) o._opacity = t.css("opacity");
|
617 |
-
t.css('opacity', o.opacity);
|
618 |
-
},
|
619 |
-
stop: function(event, ui) {
|
620 |
-
var o = jQuery(this).data('draggable').options;
|
621 |
-
if(o._opacity) jQuery(ui.helper).css('opacity', o._opacity);
|
622 |
-
}
|
623 |
-
});
|
624 |
-
|
625 |
-
jQuery.ui.plugin.add("draggable", "scroll", {
|
626 |
-
start: function(event, ui) {
|
627 |
-
var i = jQuery(this).data("draggable");
|
628 |
-
if(i.scrollParent[0] != document && i.scrollParent[0].tagName != 'HTML') i.overflowOffset = i.scrollParent.offset();
|
629 |
-
},
|
630 |
-
drag: function(event, ui) {
|
631 |
-
|
632 |
-
var i = jQuery(this).data("draggable"), o = i.options, scrolled = false;
|
633 |
-
|
634 |
-
if(i.scrollParent[0] != document && i.scrollParent[0].tagName != 'HTML') {
|
635 |
-
|
636 |
-
if(!o.axis || o.axis != 'x') {
|
637 |
-
if((i.overflowOffset.top + i.scrollParent[0].offsetHeight) - event.pageY < o.scrollSensitivity)
|
638 |
-
i.scrollParent[0].scrollTop = scrolled = i.scrollParent[0].scrollTop + o.scrollSpeed;
|
639 |
-
else if(event.pageY - i.overflowOffset.top < o.scrollSensitivity)
|
640 |
-
i.scrollParent[0].scrollTop = scrolled = i.scrollParent[0].scrollTop - o.scrollSpeed;
|
641 |
-
}
|
642 |
-
|
643 |
-
if(!o.axis || o.axis != 'y') {
|
644 |
-
if((i.overflowOffset.left + i.scrollParent[0].offsetWidth) - event.pageX < o.scrollSensitivity)
|
645 |
-
i.scrollParent[0].scrollLeft = scrolled = i.scrollParent[0].scrollLeft + o.scrollSpeed;
|
646 |
-
else if(event.pageX - i.overflowOffset.left < o.scrollSensitivity)
|
647 |
-
i.scrollParent[0].scrollLeft = scrolled = i.scrollParent[0].scrollLeft - o.scrollSpeed;
|
648 |
-
}
|
649 |
-
|
650 |
-
} else {
|
651 |
-
|
652 |
-
if(!o.axis || o.axis != 'x') {
|
653 |
-
if(event.pageY - jQuery(document).scrollTop() < o.scrollSensitivity)
|
654 |
-
scrolled = jQuery(document).scrollTop(jQuery(document).scrollTop() - o.scrollSpeed);
|
655 |
-
else if(jQuery(window).height() - (event.pageY - jQuery(document).scrollTop()) < o.scrollSensitivity)
|
656 |
-
scrolled = jQuery(document).scrollTop(jQuery(document).scrollTop() + o.scrollSpeed);
|
657 |
-
}
|
658 |
-
|
659 |
-
if(!o.axis || o.axis != 'y') {
|
660 |
-
if(event.pageX - jQuery(document).scrollLeft() < o.scrollSensitivity)
|
661 |
-
scrolled = jQuery(document).scrollLeft(jQuery(document).scrollLeft() - o.scrollSpeed);
|
662 |
-
else if(jQuery(window).width() - (event.pageX - jQuery(document).scrollLeft()) < o.scrollSensitivity)
|
663 |
-
scrolled = jQuery(document).scrollLeft(jQuery(document).scrollLeft() + o.scrollSpeed);
|
664 |
-
}
|
665 |
-
|
666 |
-
}
|
667 |
-
|
668 |
-
if(scrolled !== false && jQuery.ui.ddmanager && !o.dropBehaviour)
|
669 |
-
jQuery.ui.ddmanager.prepareOffsets(i, event);
|
670 |
-
|
671 |
-
}
|
672 |
-
});
|
673 |
-
|
674 |
-
jQuery.ui.plugin.add("draggable", "snap", {
|
675 |
-
start: function(event, ui) {
|
676 |
-
|
677 |
-
var i = jQuery(this).data("draggable"), o = i.options;
|
678 |
-
i.snapElements = [];
|
679 |
-
|
680 |
-
jQuery(o.snap.constructor != String ? ( o.snap.items || ':data(draggable)' ) : o.snap).each(function() {
|
681 |
-
var jQueryt = jQuery(this); var jQueryo = jQueryt.offset();
|
682 |
-
if(this != i.element[0]) i.snapElements.push({
|
683 |
-
item: this,
|
684 |
-
width: jQueryt.outerWidth(), height: jQueryt.outerHeight(),
|
685 |
-
top: jQueryo.top, left: jQueryo.left
|
686 |
-
});
|
687 |
-
});
|
688 |
-
|
689 |
-
},
|
690 |
-
drag: function(event, ui) {
|
691 |
-
|
692 |
-
var inst = jQuery(this).data("draggable"), o = inst.options;
|
693 |
-
var d = o.snapTolerance;
|
694 |
-
|
695 |
-
var x1 = ui.offset.left, x2 = x1 + inst.helperProportions.width,
|
696 |
-
y1 = ui.offset.top, y2 = y1 + inst.helperProportions.height;
|
697 |
-
|
698 |
-
for (var i = inst.snapElements.length - 1; i >= 0; i--){
|
699 |
-
|
700 |
-
var l = inst.snapElements[i].left, r = l + inst.snapElements[i].width,
|
701 |
-
t = inst.snapElements[i].top, b = t + inst.snapElements[i].height;
|
702 |
-
|
703 |
-
//Yes, I know, this is insane ;)
|
704 |
-
if(!((l-d < x1 && x1 < r+d && t-d < y1 && y1 < b+d) || (l-d < x1 && x1 < r+d && t-d < y2 && y2 < b+d) || (l-d < x2 && x2 < r+d && t-d < y1 && y1 < b+d) || (l-d < x2 && x2 < r+d && t-d < y2 && y2 < b+d))) {
|
705 |
-
if(inst.snapElements[i].snapping) (inst.options.snap.release && inst.options.snap.release.call(inst.element, event, jQuery.extend(inst._uiHash(), { snapItem: inst.snapElements[i].item })));
|
706 |
-
inst.snapElements[i].snapping = false;
|
707 |
-
continue;
|
708 |
-
}
|
709 |
-
|
710 |
-
if(o.snapMode != 'inner') {
|
711 |
-
var ts = Math.abs(t - y2) <= d;
|
712 |
-
var bs = Math.abs(b - y1) <= d;
|
713 |
-
var ls = Math.abs(l - x2) <= d;
|
714 |
-
var rs = Math.abs(r - x1) <= d;
|
715 |
-
if(ts) ui.position.top = inst._convertPositionTo("relative", { top: t - inst.helperProportions.height, left: 0 }).top - inst.margins.top;
|
716 |
-
if(bs) ui.position.top = inst._convertPositionTo("relative", { top: b, left: 0 }).top - inst.margins.top;
|
717 |
-
if(ls) ui.position.left = inst._convertPositionTo("relative", { top: 0, left: l - inst.helperProportions.width }).left - inst.margins.left;
|
718 |
-
if(rs) ui.position.left = inst._convertPositionTo("relative", { top: 0, left: r }).left - inst.margins.left;
|
719 |
-
}
|
720 |
-
|
721 |
-
var first = (ts || bs || ls || rs);
|
722 |
-
|
723 |
-
if(o.snapMode != 'outer') {
|
724 |
-
var ts = Math.abs(t - y1) <= d;
|
725 |
-
var bs = Math.abs(b - y2) <= d;
|
726 |
-
var ls = Math.abs(l - x1) <= d;
|
727 |
-
var rs = Math.abs(r - x2) <= d;
|
728 |
-
if(ts) ui.position.top = inst._convertPositionTo("relative", { top: t, left: 0 }).top - inst.margins.top;
|
729 |
-
if(bs) ui.position.top = inst._convertPositionTo("relative", { top: b - inst.helperProportions.height, left: 0 }).top - inst.margins.top;
|
730 |
-
if(ls) ui.position.left = inst._convertPositionTo("relative", { top: 0, left: l }).left - inst.margins.left;
|
731 |
-
if(rs) ui.position.left = inst._convertPositionTo("relative", { top: 0, left: r - inst.helperProportions.width }).left - inst.margins.left;
|
732 |
-
}
|
733 |
-
|
734 |
-
if(!inst.snapElements[i].snapping && (ts || bs || ls || rs || first))
|
735 |
-
(inst.options.snap.snap && inst.options.snap.snap.call(inst.element, event, jQuery.extend(inst._uiHash(), { snapItem: inst.snapElements[i].item })));
|
736 |
-
inst.snapElements[i].snapping = (ts || bs || ls || rs || first);
|
737 |
-
|
738 |
-
};
|
739 |
-
|
740 |
-
}
|
741 |
-
});
|
742 |
-
|
743 |
-
jQuery.ui.plugin.add("draggable", "stack", {
|
744 |
-
start: function(event, ui) {
|
745 |
-
|
746 |
-
var o = jQuery(this).data("draggable").options;
|
747 |
-
|
748 |
-
var group = jQuery.makeArray(jQuery(o.stack.group)).sort(function(a,b) {
|
749 |
-
return (parseInt(jQuery(a).css("zIndex"),10) || o.stack.min) - (parseInt(jQuery(b).css("zIndex"),10) || o.stack.min);
|
750 |
-
});
|
751 |
-
|
752 |
-
jQuery(group).each(function(i) {
|
753 |
-
this.style.zIndex = o.stack.min + i;
|
754 |
-
});
|
755 |
-
|
756 |
-
this[0].style.zIndex = o.stack.min + group.length;
|
757 |
-
|
758 |
-
}
|
759 |
-
});
|
760 |
-
|
761 |
-
jQuery.ui.plugin.add("draggable", "zIndex", {
|
762 |
-
start: function(event, ui) {
|
763 |
-
var t = jQuery(ui.helper), o = jQuery(this).data("draggable").options;
|
764 |
-
if(t.css("zIndex")) o._zIndex = t.css("zIndex");
|
765 |
-
t.css('zIndex', o.zIndex);
|
766 |
-
},
|
767 |
-
stop: function(event, ui) {
|
768 |
-
var o = jQuery(this).data("draggable").options;
|
769 |
-
if(o._zIndex) jQuery(ui.helper).css('zIndex', o._zIndex);
|
770 |
-
}
|
771 |
-
});
|
772 |
-
|
773 |
-
})(jQuery);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lib/ui.droppable.js
DELETED
@@ -1,282 +0,0 @@
|
|
1 |
-
/*
|
2 |
-
* jQuery UI Droppable 1.7.2
|
3 |
-
*
|
4 |
-
* Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
|
5 |
-
* Dual licensed under the MIT (MIT-LICENSE.txt)
|
6 |
-
* and GPL (GPL-LICENSE.txt) licenses.
|
7 |
-
*
|
8 |
-
* http://docs.jquery.com/UI/Droppables
|
9 |
-
*
|
10 |
-
* Depends:
|
11 |
-
* ui.core.js
|
12 |
-
* ui.draggable.js
|
13 |
-
*/
|
14 |
-
(function(jQuery) {
|
15 |
-
|
16 |
-
jQuery.widget("ui.droppable", {
|
17 |
-
|
18 |
-
_init: function() {
|
19 |
-
|
20 |
-
var o = this.options, accept = o.accept;
|
21 |
-
this.isover = 0; this.isout = 1;
|
22 |
-
|
23 |
-
this.options.accept = this.options.accept && jQuery.isFunction(this.options.accept) ? this.options.accept : function(d) {
|
24 |
-
return d.is(accept);
|
25 |
-
};
|
26 |
-
|
27 |
-
//Store the droppable's proportions
|
28 |
-
this.proportions = { width: this.element[0].offsetWidth, height: this.element[0].offsetHeight };
|
29 |
-
|
30 |
-
// Add the reference and positions to the manager
|
31 |
-
jQuery.ui.ddmanager.droppables[this.options.scope] = jQuery.ui.ddmanager.droppables[this.options.scope] || [];
|
32 |
-
jQuery.ui.ddmanager.droppables[this.options.scope].push(this);
|
33 |
-
|
34 |
-
(this.options.addClasses && this.element.addClass("ui-droppable"));
|
35 |
-
|
36 |
-
},
|
37 |
-
|
38 |
-
destroy: function() {
|
39 |
-
var drop = jQuery.ui.ddmanager.droppables[this.options.scope];
|
40 |
-
for ( var i = 0; i < drop.length; i++ )
|
41 |
-
if ( drop[i] == this )
|
42 |
-
drop.splice(i, 1);
|
43 |
-
|
44 |
-
this.element
|
45 |
-
.removeClass("ui-droppable ui-droppable-disabled")
|
46 |
-
.removeData("droppable")
|
47 |
-
.unbind(".droppable");
|
48 |
-
},
|
49 |
-
|
50 |
-
_setData: function(key, value) {
|
51 |
-
|
52 |
-
if(key == 'accept') {
|
53 |
-
this.options.accept = value && jQuery.isFunction(value) ? value : function(d) {
|
54 |
-
return d.is(value);
|
55 |
-
};
|
56 |
-
} else {
|
57 |
-
jQuery.widget.prototype._setData.apply(this, arguments);
|
58 |
-
}
|
59 |
-
|
60 |
-
},
|
61 |
-
|
62 |
-
_activate: function(event) {
|
63 |
-
var draggable = jQuery.ui.ddmanager.current;
|
64 |
-
if(this.options.activeClass) this.element.addClass(this.options.activeClass);
|
65 |
-
(draggable && this._trigger('activate', event, this.ui(draggable)));
|
66 |
-
},
|
67 |
-
|
68 |
-
_deactivate: function(event) {
|
69 |
-
var draggable = jQuery.ui.ddmanager.current;
|
70 |
-
if(this.options.activeClass) this.element.removeClass(this.options.activeClass);
|
71 |
-
(draggable && this._trigger('deactivate', event, this.ui(draggable)));
|
72 |
-
},
|
73 |
-
|
74 |
-
_over: function(event) {
|
75 |
-
|
76 |
-
var draggable = jQuery.ui.ddmanager.current;
|
77 |
-
if (!draggable || (draggable.currentItem || draggable.element)[0] == this.element[0]) return; // Bail if draggable and droppable are same element
|
78 |
-
|
79 |
-
if (this.options.accept.call(this.element[0],(draggable.currentItem || draggable.element))) {
|
80 |
-
if(this.options.hoverClass) this.element.addClass(this.options.hoverClass);
|
81 |
-
this._trigger('over', event, this.ui(draggable));
|
82 |
-
}
|
83 |
-
|
84 |
-
},
|
85 |
-
|
86 |
-
_out: function(event) {
|
87 |
-
|
88 |
-
var draggable = jQuery.ui.ddmanager.current;
|
89 |
-
if (!draggable || (draggable.currentItem || draggable.element)[0] == this.element[0]) return; // Bail if draggable and droppable are same element
|
90 |
-
|
91 |
-
if (this.options.accept.call(this.element[0],(draggable.currentItem || draggable.element))) {
|
92 |
-
if(this.options.hoverClass) this.element.removeClass(this.options.hoverClass);
|
93 |
-
this._trigger('out', event, this.ui(draggable));
|
94 |
-
}
|
95 |
-
|
96 |
-
},
|
97 |
-
|
98 |
-
_drop: function(event,custom) {
|
99 |
-
|
100 |
-
var draggable = custom || jQuery.ui.ddmanager.current;
|
101 |
-
if (!draggable || (draggable.currentItem || draggable.element)[0] == this.element[0]) return false; // Bail if draggable and droppable are same element
|
102 |
-
|
103 |
-
var childrenIntersection = false;
|
104 |
-
this.element.find(":data(droppable)").not(".ui-draggable-dragging").each(function() {
|
105 |
-
var inst = jQuery.data(this, 'droppable');
|
106 |
-
if(inst.options.greedy && jQuery.ui.intersect(draggable, jQuery.extend(inst, { offset: inst.element.offset() }), inst.options.tolerance)) {
|
107 |
-
childrenIntersection = true; return false;
|
108 |
-
}
|
109 |
-
});
|
110 |
-
if(childrenIntersection) return false;
|
111 |
-
|
112 |
-
if(this.options.accept.call(this.element[0],(draggable.currentItem || draggable.element))) {
|
113 |
-
if(this.options.activeClass) this.element.removeClass(this.options.activeClass);
|
114 |
-
if(this.options.hoverClass) this.element.removeClass(this.options.hoverClass);
|
115 |
-
this._trigger('drop', event, this.ui(draggable));
|
116 |
-
return this.element;
|
117 |
-
}
|
118 |
-
|
119 |
-
return false;
|
120 |
-
|
121 |
-
},
|
122 |
-
|
123 |
-
ui: function(c) {
|
124 |
-
return {
|
125 |
-
draggable: (c.currentItem || c.element),
|
126 |
-
helper: c.helper,
|
127 |
-
position: c.position,
|
128 |
-
absolutePosition: c.positionAbs, //deprecated
|
129 |
-
offset: c.positionAbs
|
130 |
-
};
|
131 |
-
}
|
132 |
-
|
133 |
-
});
|
134 |
-
|
135 |
-
jQuery.extend(jQuery.ui.droppable, {
|
136 |
-
version: "1.7.2",
|
137 |
-
eventPrefix: 'drop',
|
138 |
-
defaults: {
|
139 |
-
accept: '*',
|
140 |
-
activeClass: false,
|
141 |
-
addClasses: true,
|
142 |
-
greedy: false,
|
143 |
-
hoverClass: false,
|
144 |
-
scope: 'default',
|
145 |
-
tolerance: 'intersect'
|
146 |
-
}
|
147 |
-
});
|
148 |
-
|
149 |
-
jQuery.ui.intersect = function(draggable, droppable, toleranceMode) {
|
150 |
-
|
151 |
-
if (!droppable.offset) return false;
|
152 |
-
|
153 |
-
var x1 = (draggable.positionAbs || draggable.position.absolute).left, x2 = x1 + draggable.helperProportions.width,
|
154 |
-
y1 = (draggable.positionAbs || draggable.position.absolute).top, y2 = y1 + draggable.helperProportions.height;
|
155 |
-
var l = droppable.offset.left, r = l + droppable.proportions.width,
|
156 |
-
t = droppable.offset.top, b = t + droppable.proportions.height;
|
157 |
-
|
158 |
-
switch (toleranceMode) {
|
159 |
-
case 'fit':
|
160 |
-
return (l < x1 && x2 < r
|
161 |
-
&& t < y1 && y2 < b);
|
162 |
-
break;
|
163 |
-
case 'intersect':
|
164 |
-
return (l < x1 + (draggable.helperProportions.width / 2) // Right Half
|
165 |
-
&& x2 - (draggable.helperProportions.width / 2) < r // Left Half
|
166 |
-
&& t < y1 + (draggable.helperProportions.height / 2) // Bottom Half
|
167 |
-
&& y2 - (draggable.helperProportions.height / 2) < b ); // Top Half
|
168 |
-
break;
|
169 |
-
case 'pointer':
|
170 |
-
var draggableLeft = ((draggable.positionAbs || draggable.position.absolute).left + (draggable.clickOffset || draggable.offset.click).left),
|
171 |
-
draggableTop = ((draggable.positionAbs || draggable.position.absolute).top + (draggable.clickOffset || draggable.offset.click).top),
|
172 |
-
isOver = jQuery.ui.isOver(draggableTop, draggableLeft, t, l, droppable.proportions.height, droppable.proportions.width);
|
173 |
-
return isOver;
|
174 |
-
break;
|
175 |
-
case 'touch':
|
176 |
-
return (
|
177 |
-
(y1 >= t && y1 <= b) || // Top edge touching
|
178 |
-
(y2 >= t && y2 <= b) || // Bottom edge touching
|
179 |
-
(y1 < t && y2 > b) // Surrounded vertically
|
180 |
-
) && (
|
181 |
-
(x1 >= l && x1 <= r) || // Left edge touching
|
182 |
-
(x2 >= l && x2 <= r) || // Right edge touching
|
183 |
-
(x1 < l && x2 > r) // Surrounded horizontally
|
184 |
-
);
|
185 |
-
break;
|
186 |
-
default:
|
187 |
-
return false;
|
188 |
-
break;
|
189 |
-
}
|
190 |
-
|
191 |
-
};
|
192 |
-
|
193 |
-
/*
|
194 |
-
This manager tracks offsets of draggables and droppables
|
195 |
-
*/
|
196 |
-
jQuery.ui.ddmanager = {
|
197 |
-
current: null,
|
198 |
-
droppables: { 'default': [] },
|
199 |
-
prepareOffsets: function(t, event) {
|
200 |
-
|
201 |
-
var m = jQuery.ui.ddmanager.droppables[t.options.scope];
|
202 |
-
var type = event ? event.type : null; // workaround for #2317
|
203 |
-
var list = (t.currentItem || t.element).find(":data(droppable)").andSelf();
|
204 |
-
|
205 |
-
droppablesLoop: for (var i = 0; i < m.length; i++) {
|
206 |
-
|
207 |
-
if(m[i].options.disabled || (t && !m[i].options.accept.call(m[i].element[0],(t.currentItem || t.element)))) continue; //No disabled and non-accepted
|
208 |
-
for (var j=0; j < list.length; j++) { if(list[j] == m[i].element[0]) { m[i].proportions.height = 0; continue droppablesLoop; } }; //Filter out elements in the current dragged item
|
209 |
-
m[i].visible = m[i].element.css("display") != "none"; if(!m[i].visible) continue; //If the element is not visible, continue
|
210 |
-
|
211 |
-
m[i].offset = m[i].element.offset();
|
212 |
-
m[i].proportions = { width: m[i].element[0].offsetWidth, height: m[i].element[0].offsetHeight };
|
213 |
-
|
214 |
-
if(type == "mousedown") m[i]._activate.call(m[i], event); //Activate the droppable if used directly from draggables
|
215 |
-
|
216 |
-
}
|
217 |
-
|
218 |
-
},
|
219 |
-
drop: function(draggable, event) {
|
220 |
-
|
221 |
-
var dropped = false;
|
222 |
-
jQuery.each(jQuery.ui.ddmanager.droppables[draggable.options.scope], function() {
|
223 |
-
|
224 |
-
if(!this.options) return;
|
225 |
-
if (!this.options.disabled && this.visible && jQuery.ui.intersect(draggable, this, this.options.tolerance))
|
226 |
-
dropped = this._drop.call(this, event);
|
227 |
-
|
228 |
-
if (!this.options.disabled && this.visible && this.options.accept.call(this.element[0],(draggable.currentItem || draggable.element))) {
|
229 |
-
this.isout = 1; this.isover = 0;
|
230 |
-
this._deactivate.call(this, event);
|
231 |
-
}
|
232 |
-
|
233 |
-
});
|
234 |
-
return dropped;
|
235 |
-
|
236 |
-
},
|
237 |
-
drag: function(draggable, event) {
|
238 |
-
|
239 |
-
//If you have a highly dynamic page, you might try this option. It renders positions every time you move the mouse.
|
240 |
-
if(draggable.options.refreshPositions) jQuery.ui.ddmanager.prepareOffsets(draggable, event);
|
241 |
-
|
242 |
-
//Run through all droppables and check their positions based on specific tolerance options
|
243 |
-
|
244 |
-
jQuery.each(jQuery.ui.ddmanager.droppables[draggable.options.scope], function() {
|
245 |
-
|
246 |
-
if(this.options.disabled || this.greedyChild || !this.visible) return;
|
247 |
-
var intersects = jQuery.ui.intersect(draggable, this, this.options.tolerance);
|
248 |
-
|
249 |
-
var c = !intersects && this.isover == 1 ? 'isout' : (intersects && this.isover == 0 ? 'isover' : null);
|
250 |
-
if(!c) return;
|
251 |
-
|
252 |
-
var parentInstance;
|
253 |
-
if (this.options.greedy) {
|
254 |
-
var parent = this.element.parents(':data(droppable):eq(0)');
|
255 |
-
if (parent.length) {
|
256 |
-
parentInstance = jQuery.data(parent[0], 'droppable');
|
257 |
-
parentInstance.greedyChild = (c == 'isover' ? 1 : 0);
|
258 |
-
}
|
259 |
-
}
|
260 |
-
|
261 |
-
// we just moved into a greedy child
|
262 |
-
if (parentInstance && c == 'isover') {
|
263 |
-
parentInstance['isover'] = 0;
|
264 |
-
parentInstance['isout'] = 1;
|
265 |
-
parentInstance._out.call(parentInstance, event);
|
266 |
-
}
|
267 |
-
|
268 |
-
this[c] = 1; this[c == 'isout' ? 'isover' : 'isout'] = 0;
|
269 |
-
this[c == "isover" ? "_over" : "_out"].call(this, event);
|
270 |
-
|
271 |
-
// we just moved out of a greedy child
|
272 |
-
if (parentInstance && c == 'isout') {
|
273 |
-
parentInstance['isout'] = 0;
|
274 |
-
parentInstance['isover'] = 1;
|
275 |
-
parentInstance._over.call(parentInstance, event);
|
276 |
-
}
|
277 |
-
});
|
278 |
-
|
279 |
-
}
|
280 |
-
};
|
281 |
-
|
282 |
-
})(jQuery);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
readme.txt
CHANGED
@@ -2,8 +2,8 @@
|
|
2 |
Contributors: cvernon, justinstresslimit, MaryVogt, zgrossbart
|
3 |
Tags: posts, post, calendar, AJAX, admin, administration
|
4 |
Requires at least: 2.8.5
|
5 |
-
Tested up to: 3.
|
6 |
-
Stable tag: 1.3.
|
7 |
|
8 |
The Editorial Calendar makes it possible to see all your posts and drag and drop them to manage your blog.
|
9 |
|
@@ -152,6 +152,12 @@ Moving published posts can cause problems with some RSS feeds and is generally n
|
|
152 |
|
153 |
== Changelog ==
|
154 |
|
|
|
|
|
|
|
|
|
|
|
|
|
155 |
= 1.3.2 =
|
156 |
* We are now showing the full post content in the quick edit dialog even if there is a more tag
|
157 |
so we don't overwrite the post without the full post content.
|
2 |
Contributors: cvernon, justinstresslimit, MaryVogt, zgrossbart
|
3 |
Tags: posts, post, calendar, AJAX, admin, administration
|
4 |
Requires at least: 2.8.5
|
5 |
+
Tested up to: 3.1
|
6 |
+
Stable tag: 1.3.3
|
7 |
|
8 |
The Editorial Calendar makes it possible to see all your posts and drag and drop them to manage your blog.
|
9 |
|
152 |
|
153 |
== Changelog ==
|
154 |
|
155 |
+
= 1.3.3 =
|
156 |
+
* The calendar now supports Dutch. Thanks to Helma Paternostre.
|
157 |
+
* We are no longer including the thickbox media upload files so the calendar loads faster.
|
158 |
+
* The calendar now loads JQuery UI drag and drop support from WordPress instead of embedding the code. This allows us to upgrade to the latest version of JQuery UI, avoid some conflicts with other plugins, and load faster.
|
159 |
+
* Fixed an error with the message panels so they will close properly on Chrome.
|
160 |
+
|
161 |
= 1.3.2 =
|
162 |
* We are now showing the full post content in the quick edit dialog even if there is a more tag
|
163 |
so we don't overwrite the post without the full post content.
|