Version Description
Fixed bug related to nDays view.
=
Download this release
Release Info
Developer | codepeople |
Plugin | Payment Form for PayPal Pro |
Version | 1.2.48 |
Comparing to | |
See all releases |
Code changes from version 1.0.8 to 1.2.48
- DC_MultiViewCal/css/calendarMain.css +160 -0
- DC_MultiViewCal/css/colorselect.css +7 -0
- DC_MultiViewCal/css/cupertino/calendar.css +160 -0
- DC_MultiViewCal/css/dropdown.css +5 -0
- DC_MultiViewCal/css/images/cal.gif +0 -0
- DC_MultiViewCal/css/images/close.png +0 -0
- DC_MultiViewCal/css/images/corner.png +0 -0
- DC_MultiViewCal/css/images/dropdown.png +0 -0
- DC_MultiViewCal/css/images/icons.png +0 -0
- DC_MultiViewCal/css/images/icons_beige.png +0 -0
- DC_MultiViewCal/css/images/icons_black.png +0 -0
- DC_MultiViewCal/css/images/icons_blue.png +0 -0
- DC_MultiViewCal/css/images/icons_green.png +0 -0
- DC_MultiViewCal/css/images/icons_orange.png +0 -0
- DC_MultiViewCal/css/images/icons_white.png +0 -0
- DC_MultiViewCal/css/images/icons_yellow.png +0 -0
- DC_MultiViewCal/css/images/source.png +0 -0
- DC_MultiViewCal/css/images/tooltop.gif +0 -0
- DC_MultiViewCal/css/main.css +116 -0
- DC_MultiViewCal/index.html +1 -0
- DC_MultiViewCal/language/multiview_lang_cs_CZ.js +188 -0
- DC_MultiViewCal/language/multiview_lang_da_DK.js +186 -0
- DC_MultiViewCal/language/multiview_lang_de_DE.js +188 -0
- DC_MultiViewCal/language/multiview_lang_du_DU.js +188 -0
- DC_MultiViewCal/language/multiview_lang_en_GB.js +186 -0
- DC_MultiViewCal/language/multiview_lang_es_ES.js +193 -0
- DC_MultiViewCal/language/multiview_lang_fr_FR.js +188 -0
- DC_MultiViewCal/language/multiview_lang_it_IT.js +188 -0
- DC_MultiViewCal/language/multiview_lang_nb_NO.js +188 -0
- DC_MultiViewCal/language/multiview_lang_nl_NL.js +188 -0
- DC_MultiViewCal/language/multiview_lang_pl_PL.js +186 -0
- DC_MultiViewCal/language/multiview_lang_pt_BR.js +191 -0
- DC_MultiViewCal/language/multiview_lang_pt_PT.js +191 -0
- DC_MultiViewCal/language/multiview_lang_ru_RU.js +186 -0
- DC_MultiViewCal/language/multiview_lang_sk_SK.js +186 -0
- DC_MultiViewCal/language/multiview_lang_sl_SI.js +186 -0
- DC_MultiViewCal/src/Plugins/Common.js +133 -0
- DC_MultiViewCal/src/Plugins/images/buttons.gif +0 -0
- DC_MultiViewCal/src/Plugins/images/toolbar.gif +0 -0
- DC_MultiViewCal/src/Plugins/jquery.alert.js +330 -0
- DC_MultiViewCal/src/Plugins/jquery.calendar.js +4149 -0
- DC_MultiViewCal/src/Plugins/jquery.cleditor.css +24 -0
- DC_MultiViewCal/src/Plugins/jquery.cleditor.js +1176 -0
- DC_MultiViewCal/src/Plugins/jquery.colorselect.js +161 -0
- DC_MultiViewCal/src/Plugins/jquery.dropdown.js +135 -0
- DC_MultiViewCal/src/Plugins/jquery.form.js +461 -0
- {js → DC_MultiViewCal/src/Plugins}/jquery.validate.js +7 -11
- DC_MultiViewCal/src/Plugins/multiview.js +536 -0
- DC_MultiViewCal/src/Plugins/multiview.public.js +24 -0
- DC_MultiViewCal/src/Plugins/repeat.js +466 -0
- DC_MultiViewCal/src/Plugins/rrule.js +2278 -0
- DC_MultiViewCal/src/Plugins/underscore.js +1061 -0
- README.txt +402 -136
- captcha/captcha.php +0 -173
- captcha/font-1.ttf +0 -0
- captcha/font-2.ttf +0 -0
- captcha/font-3.ttf +0 -0
- captcha/font-4.ttf +0 -0
- changelog.txt +6 -0
- classes/cp-base-class.inc.php +86 -0
- cp-admin-int-list.inc.php +198 -0
- cp-admin-int.inc.php +120 -0
- cp-main-class.inc.php +661 -0
- cp-metabox.inc.php +414 -0
- cp-multi-view-calendar.php +33 -0
- cp-public-int.inc.php +29 -0
- cp_ppp.php +0 -1452
- cp_ppp_admin_int.php +0 -723
- cp_ppp_admin_int_list.inc.php +0 -300
- cp_ppp_admin_int_message_list.inc.php +0 -230
- cp_ppp_data_source.inc.php +0 -342
- cp_ppp_paypal_pro_int.inc.php +0 -379
- cp_ppp_public_int.inc.php +0 -148
- cp_ppp_scripts.js +0 -3
- css/cupertino/images/ui-bg_diagonals-thick_90_eeeeee_40x40.png +0 -0
- css/cupertino/images/ui-bg_flat_15_cd0a0a_40x100.png +0 -0
- css/cupertino/images/ui-bg_glass_100_e4f1fb_1x400.png +0 -0
- css/cupertino/images/ui-bg_glass_50_3baae3_1x400.png +0 -0
- css/cupertino/images/ui-bg_glass_80_d7ebf9_1x400.png +0 -0
- css/cupertino/images/ui-bg_glass_80_eebd4d_1x400.png +0 -0
- css/cupertino/images/ui-bg_highlight-hard_100_f2f5f7_1x100.png +0 -0
- css/cupertino/images/ui-bg_highlight-hard_70_000000_1x100.png +0 -0
- css/cupertino/images/ui-bg_highlight-soft_100_deedf7_1x100.png +0 -0
- css/cupertino/images/ui-bg_highlight-soft_25_ffef8f_1x100.png +0 -0
- css/cupertino/images/ui-icons_2694e8_256x240.png +0 -0
- css/cupertino/images/ui-icons_2e83ff_256x240.png +0 -0
- css/cupertino/images/ui-icons_3d80b3_256x240.png +0 -0
- css/cupertino/images/ui-icons_72a7cf_256x240.png +0 -0
- css/cupertino/images/ui-icons_ffffff_256x240.png +0 -0
- css/cupertino/jquery-ui-1.8.20.custom.css +0 -565
- css/style.css +0 -105
- css/stylepublic.css +0 -80
- help/cssstyles.html +97 -0
- help/imgsamples/01.png +0 -0
- help/imgsamples/02.png +0 -0
- help/imgsamples/03.png +0 -0
- help/imgsamples/04.png +0 -0
- help/imgsamples/05.png +0 -0
- help/imgsamples/06.png +0 -0
- help/imgsamples/07.png +0 -0
- help/imgsamples/08.png +0 -0
- help/imgsamples/09.png +0 -0
- help/imgsamples/10.png +0 -0
- help/imgsamples/11.png +0 -0
- help/imgsamples/12.png +0 -0
- help/imgsamples/13.png +0 -0
- help/imgsamples/14.png +0 -0
- help/imgsamples/15.png +0 -0
- help/imgsamples/16.png +0 -0
- help/imgsamples/17.png +0 -0
- help/imgsamples/18.png +0 -0
- help/imgsamples/19.png +0 -0
- help/imgsamples/20.png +0 -0
- help/imgstyles/black-tie.png +0 -0
- help/imgstyles/blitzer.png +0 -0
- help/imgstyles/cupertino.png +0 -0
- help/imgstyles/dark-hive.png +0 -0
- help/imgstyles/eggplant.png +0 -0
- help/imgstyles/excite-bike.png +0 -0
- help/imgstyles/flick.png +0 -0
- help/imgstyles/hot-sneaks.png +0 -0
- help/imgstyles/humanity.png +0 -0
- help/imgstyles/le-frog.png +0 -0
- help/imgstyles/mint-choc.png +0 -0
- help/imgstyles/overcast.png +0 -0
- help/imgstyles/pepper-grinder.png +0 -0
- help/imgstyles/redmond.png +0 -0
- help/imgstyles/smoothness.png +0 -0
- help/imgstyles/south-street.png +0 -0
- help/imgstyles/start.png +0 -0
- help/imgstyles/sunny.png +0 -0
- help/imgstyles/swanky-purse.png +0 -0
- help/imgstyles/trontastic.png +0 -0
- help/imgstyles/ui-darkness.png +0 -0
- help/imgstyles/ui-lightness.png +0 -0
- help/imgstyles/vader.png +0 -0
- help/samples.html +82 -0
- images/blank.gif +0 -0
- images/colorpicker_background.png +0 -0
- images/colorpicker_hex.png +0 -0
- images/colorpicker_hsb_b.png +0 -0
- images/colorpicker_hsb_h.png +0 -0
- images/colorpicker_hsb_s.png +0 -0
- images/colorpicker_indic.gif +0 -0
- images/colorpicker_overlay.png +0 -0
- images/colorpicker_rgb_b.png +0 -0
- images/colorpicker_rgb_g.png +0 -0
- images/colorpicker_rgb_r.png +0 -0
- images/colorpicker_select.gif +0 -0
- images/colorpicker_submit.png +0 -0
- images/cp-apps.gif +0 -0
- images/cp_form.gif +0 -0
- images/custom_background.png +0 -0
- images/custom_hex.png +0 -0
- images/custom_hsb_b.png +0 -0
- images/custom_hsb_h.png +0 -0
- images/custom_hsb_s.png +0 -0
- images/custom_indic.gif +0 -0
- images/custom_rgb_b.png +0 -0
- images/custom_rgb_g.png +0 -0
- images/custom_rgb_r.png +0 -0
- images/custom_submit.png +0 -0
- images/loading.gif +0 -0
- images/recycle_bin.png +0 -0
- images/select.png +0 -0
- images/select2.png +0 -0
- images/slider.png +0 -0
- images/tooltop.gif +0 -0
- js/fbuilder-loader-admin.php +0 -83
- js/fbuilder-loader-public.php +0 -90
- js/fbuilder-pro-admin.jquery.js +0 -883
DC_MultiViewCal/css/calendarMain.css
ADDED
@@ -0,0 +1,160 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
#nnnnnn1 header
|
3 |
+
#nnnnnn6 cells
|
4 |
+
#nnnnnn3 today and nonmonth
|
5 |
+
#nnnnnn4 active
|
6 |
+
*/
|
7 |
+
#multicalendar {border:1px solid #nnnnnn1;padding:5px;background:#nnnnnn3;color:#333;font-family: Lucida Grande, Lucida Sans, Arial, sans-serif; font-size: 1.1em;}
|
8 |
+
#multicalendar.calendaredition {border:0px;background:none;padding:0px}
|
9 |
+
#multicalendar .fbutton {border:1px solid #nnnnnn1;background:#nnnnnn6;padding-bottom:1px;color:#nnnnnn7;font-weight:normal}
|
10 |
+
#multicalendar .fbutton.ui-state-active {background:#nnnnnn4;color:#nnnnnn5;border:1px solid #nnnnnn1;}
|
11 |
+
#multicalendar .gridcontainercover {border:1px solid #nnnnnn1;padding:5px;background:#fff}
|
12 |
+
#multicalendar .ui-datepicker .ui-datepicker-other-month {color:#CFCFCF}
|
13 |
+
#multicalendar .calmain {background:#nnnnnn1}
|
14 |
+
#multicalendar .scolltimeevent {position:relative;overflow-y:scroll;overflow-x:hidden;border-top:1px solid #D8D8D8;border-left:1px solid #D8D8D8;border-bottom:1px solid #fff;padding:0;font-size:12px;line-height:normal;}
|
15 |
+
#multicalendar .wk-top {table-layout:fixed;width:100%;overflow:hidden;font-size:12px;line-height:10px;}
|
16 |
+
#multicalendar .wk-dayname {font-weight:normal;color:#333;padding:2px 4px;margin-left:4px;white-space:nowrap}
|
17 |
+
#multicalendar .wk-daylink {cursor:pointer;}
|
18 |
+
#multicalendar .wk-daylink:hover {text-decoration:underline;}
|
19 |
+
#multicalendar .wk-allday {font-size:12px;line-height:14px;border-top:1px solid #D8D8D8;border-right:1px solid #D8D8D8;}
|
20 |
+
#multicalendar .wk-alldayList {background:#fff;font-size:12px;line-height:14px;border:1px solid #D8D8D8;border-left:4px solid #D8D8D8;border-right:4px solid #D8D8D8;padding:1px;text-align:center;color:#nnnnnn1;}
|
21 |
+
#multicalendar .wk-dayWithColumns {text-align:center;color:#fff;}
|
22 |
+
#multicalendar .wk-allday .st-c {padding-left:0;padding-right:0;border-left:1px solid #D8D8D8;}
|
23 |
+
#multicalendar .wk-allday .wk-allday-last .st-c {border-bottom:1px solid #D8D8D8;}
|
24 |
+
#multicalendar .st-grid {position:relative;table-layout:fixed;width:100%;}
|
25 |
+
#multicalendar .st-c {padding:1px 1px 0 2px;vertical-align:top;font-family:Verdana, sans-serif}
|
26 |
+
#multicalendar .st-s {padding-bottom:2px;cursor:default;}
|
27 |
+
.tg-timedevents {background-color:#fff;table-layout:fixed;width:100%;margin-top:-1px}
|
28 |
+
.tg-times {padding:0;font-family:Arial;font-size:11px;text-align:right;vertical-align:top;padding-right:1px;padding-top:1px;overflow:hidden;}
|
29 |
+
.tg-time {border-bottom:1px solid #ddd;padding-right:2px;text-align:center;}
|
30 |
+
.tg-col {overflow:hidden;vertical-align:top;}
|
31 |
+
.tg-col-overlaywrapper {position:relative;height:0}
|
32 |
+
.tg-col-eventwrapper {position:relative;cursor:default;margin-right:10px;border-left:1px solid #D8D8D8;}
|
33 |
+
.tg-today {background-color:#ffc;}
|
34 |
+
.tg-spanningwrapper {position:relative;margin-left:3px;height:1px;top:1px;}
|
35 |
+
.tg-hourmarkers {position:absolute;width:100%}
|
36 |
+
.tg-dualmarker {border-top:1px solid #ddd;height:20px;line-height:20px;border-bottom:1px dotted #ddd;margin-bottom:20px;}
|
37 |
+
.tg-nowmarker {position:absolute;left:0;width:100%;top:0;height:0;border-top:2px solid red;overflow:hidden;opacity:0.4;filter:alpha(opacity=40);}
|
38 |
+
.chip {position:absolute;overflow:hidden;cursor:default;color:#fff;-moz-user-select:none;}
|
39 |
+
.chip dl {margin:0;padding-bottom:1px;border-left:1px solid;border-right:1px solid;overflow:hidden}
|
40 |
+
.chip dt {margin-top:-1px;font:bold 80%/normal Verdana, Sans-serif;white-space:nowrap;overflow:hidden;padding-left:1px;text-align:left;}
|
41 |
+
.chip a:link, .chip a:visited, .chip a:active {text-decoration:none;color:#fff}
|
42 |
+
.ie6 .chip dl {zoom:1}
|
43 |
+
.ie6 .chip dt {width:100%;margin-right:-1px}
|
44 |
+
.chip dd {margin:0;overflow:hidden;padding:0 1px;font:100%/1.3em Verdana, Sans-serif;text-align:left;word-wrap:break-word}
|
45 |
+
.cb1, .cb2 {border-style:solid;overflow:hidden;}
|
46 |
+
.cb1 {height:1px;margin:0 1px;border-width:0 1px}
|
47 |
+
.cb2 {height:0;margin:0 2px;border-width:0 0 1px}
|
48 |
+
.ct {height:0;overflow:hidden;border-style:solid;border-width:0 2px 2px;border-color:transparent}
|
49 |
+
.ie6 .ct {border-style:solid dotted}
|
50 |
+
.ff2 .cic {display:-moz-inline-box;vertical-align:bottom;position:relative;top:-2px}
|
51 |
+
.cic-tmr {background-position:-28px -57px}
|
52 |
+
.cic-rcr {background-position:-37px -50px}
|
53 |
+
.cic-spcl {background-position:-37px -57px}
|
54 |
+
.resizer {position:absolute;height:7px;line-height:7px;width:100%;bottom:0;cursor:s-resize;}
|
55 |
+
.rszr_icon {/*display:none;*/border-top:3px double white;font-size:0;line-height:0;height:0;width:10px;margin-left:auto;margin-right:auto}
|
56 |
+
.rb-o {margin:0 1px;border-width:1px 0;border-style:solid;cursor:pointer}
|
57 |
+
.rb-m {padding-left:3px;margin:0 -1px;border-width:0 1px;border-style:solid;zoom:1}
|
58 |
+
.mv-container {height:100%;position:relative;line-height:14px;white-space:nowrap;}
|
59 |
+
.mv-container th{font-size:12px;}
|
60 |
+
.st-contents, .mv-container {font-size:11px;line-height:14px}
|
61 |
+
#multicalendar .mv-daynames-table {position:absolute;table-layout:fixed;top:0;left:0;width:100%;}
|
62 |
+
#multicalendar .mv-dayname {font-weight:normal}
|
63 |
+
#multicalendar .mv-event-container {overflow:hidden;position:absolute;left:0;width:100%;top:14px;bottom:0;background:white;border-right:1px solid #D8D8D8;border-bottom:1px solid #D8D8D8;}
|
64 |
+
#multicalendar .month-row {position:absolute;left:0;width:100%;overflow:hidden}
|
65 |
+
#multicalendar .st-bg-table {position:absolute;top:0;left:0;height:100%;width:100%;table-layout:fixed}
|
66 |
+
#multicalendar .st-bg {border-left:1px solid #D8D8D8}
|
67 |
+
#multicalendar .st-bg-today {background-color:#ffc}
|
68 |
+
#multicalendar .st-dtitle {border-left:1px solid #D8D8D8;border-top:1px solid #D8D8D8;padding-right:2px;text-align:right;line-height:16px;overflow:hidden}
|
69 |
+
#multicalendar .st-dtitle-nonmonth {color:#D2D2D2}
|
70 |
+
#multicalendar .st-more {color:#FEFEFE;text-align:center;cursor:pointer;/*font-family:Arial, sans-serif*/}
|
71 |
+
#multicalendar .st-moreul {text-decoration:underline}
|
72 |
+
.cc {position:absolute;z-index:2000;border:1px solid gray;background-color:white;visibility:hidden}
|
73 |
+
.cc-title {padding:2px;font-weight:bold}
|
74 |
+
#multicalendar .st-ad-ml,#multicalendar .st-ad-mr {position:relative;top:2px;margin-bottom:-8px;height:0;width:0;line-height:0;font-size:0;border-top:4px dotted;border-top:4px solid transparent;border-bottom:4px dotted;border-bottom:4px solid transparent}
|
75 |
+
#multicalendar .st-ad-mpad {padding-left:10px}
|
76 |
+
#multicalendar .st-ad-ml {border-right:4px solid white;margin-left:-7px;margin-right:auto}
|
77 |
+
#multicalendar .st-ad-mr {border-left:4px solid white;margin-left:auto;margin-right:3px}
|
78 |
+
.bbit-cs-split{margin-top:2px;padding:2px;border-top:solid 1px #555;}
|
79 |
+
.drag-lasso-container {POSITION: absolute;WIDTH: 0px;HEIGHT: 0px;TOP: 0px;LEFT: 0px}
|
80 |
+
.drag-lasso {POSITION: absolute;FILTER: alpha(opacity=50);LINE-HEIGHT: 0;BACKGROUND-COLOR: #nnnnnn1;FONT-SIZE: 0px;opacity: 0.5;-khtml-opacity: 0.5}
|
81 |
+
.drag-event {Z-INDEX: 1000;POSITION: absolute;FONT-FAMILY: Verdana,sans-serif;CURSOR: pointer}
|
82 |
+
.drag-chip-wrapper {Z-INDEX: 1;POSITION: absolute;WIDTH: 100%;LEFT: 0px}
|
83 |
+
.drag-chip {FILTER: alpha(opacity=80);CURSOR: pointer;opacity: .8;-khtml-opacity: .8}
|
84 |
+
.monthdayshow{cursor:pointer;}
|
85 |
+
.monthdayshow:hover{text-decoration:underline;}
|
86 |
+
.infocontainer a.ui-button,#popup_ok,#popup_cancel,#bbit-cal-AddBTN{border:1px solid #nnnnnn1;background-color:#nnnnnn6;padding:2px 6px 5px 6px;text-decoration:none;color:#333;line-height:18px;}
|
87 |
+
#multicalendar .ui-icon,.fbutton .ui-icon,#multicalendar .ui-state-default .ui-icon{display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat;background-image: url(../images/nnnnnnimg10);}
|
88 |
+
#multicalendar .fbutton .ui-icon-circle-triangle-w { background-position: -27px 0px;width:5px;height:8px;margin:7px 7px 0px 5px;}
|
89 |
+
#multicalendar .fbutton .ui-icon-circle-triangle-e { background-position: -32px 0px;width:5px;height:8px;margin:7px 5px 0px 7px;}
|
90 |
+
#multicalendar .ui-datepicker-prev span.ui-icon-circle-triangle-w { background-position: 0px -9px;width:7px;height:12px;background-image: url(../images/nnnnnnimg11); }
|
91 |
+
#multicalendar .ui-datepicker-next span.ui-icon-circle-triangle-e { background-position: -7px -9px;width:7px;height:12px;background-image: url(../images/nnnnnnimg11); }
|
92 |
+
#multicalendar .fbutton .ui-icon-new,.fbutton .ui-icon-new { background-position: 0px 0px;width:9px;height:9px;margin:5px 5px 0px 0px}
|
93 |
+
#multicalendar .fbutton .ui-icon-refresh { background-position: -9px 0px;width:9px;height:9px;margin:5px 5px 0px 0px}
|
94 |
+
#multicalendar .fbutton .ui-icon-today { background-position: -18px 0px;width:9px;height:8px;margin:6px 5px 0px 0px}
|
95 |
+
#multicalendar .ui-datepicker { padding: 0; display: none; }
|
96 |
+
#multicalendar .ui-datepicker .ui-datepicker-header{ position:relative; padding:0;border: 1px solid #nnnnnn1; background: #nnnnnn3;margin:0;font-weight: bold; }
|
97 |
+
#multicalendar .ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 2px; width: 1.8em; height: 1.8em; }
|
98 |
+
#multicalendar .ui-datepicker .ui-datepicker-prev { top:3px;left:1px;}
|
99 |
+
#multicalendar .ui-datepicker .ui-datepicker-next { top:3px;right:1px; }
|
100 |
+
#multicalendar .ui-datepicker .ui-datepicker-prev-hover { left:1px; }
|
101 |
+
#multicalendar .ui-datepicker .ui-datepicker-next-hover { right:1px; }
|
102 |
+
#multicalendar .ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span { display: block; position: absolute; left: 50%; margin-left: -8px; top: 50%; margin-top: -8px; }
|
103 |
+
#multicalendar .ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; }
|
104 |
+
#multicalendar .ui-datepicker .ui-datepicker-title select { font-size:1em; margin:1px 0; }
|
105 |
+
#multicalendar .ui-datepicker select.ui-datepicker-month-year {width: 100%;}
|
106 |
+
#multicalendar .ui-datepicker select.ui-datepicker-month,
|
107 |
+
#multicalendar .ui-datepicker select.ui-datepicker-year { width: 49%;}
|
108 |
+
#multicalendar .ui-datepicker table {width: 100%; font-size: .9em; border-collapse: separate;border:1px solid #D8D8D8;border-top:0px;background:#fff; margin:0px;padding: 0px; }
|
109 |
+
#multicalendar .ui-datepicker th { padding: 3px 0px 3px 0px; text-align: center; font-weight: bold;border-bottom:1px solid #d8d8d8 }
|
110 |
+
#multicalendar .ui-datepicker td { padding: 1px;border:1px solid #fff }
|
111 |
+
#multicalendar .ui-datepicker td.ui-datepicker-today {background:#E0E0E0;font-weight:bold;}
|
112 |
+
#multicalendar .ui-datepicker td.ui-state-active,#multicalendar.calendaredition .ui-datepicker a.ui-state-active,#multicalendar .ui-datepicker td.ui-datepicker-today.ui-state-active{background:#nnnnnn8;color:#ccc;border:1px solid #fff;}
|
113 |
+
#multicalendar .ui-datepicker td.ui-state-active a{color:#nnnnnn9}
|
114 |
+
|
115 |
+
#multicalendar .ui-datepicker td.ui-state-active a,#multicalendar .ui-datepicker td.ui-state-non-active a{border:0px}
|
116 |
+
#multicalendar .ui-datepicker td.ui-datepicker-other-month{opacity:0.2;filter:alpha(opacity=20);background:none;}
|
117 |
+
#multicalendar .ui-datepicker td span, .ui-datepicker td a { color:#333; display: block; padding: 0px 4px; text-align: right; text-decoration: none; }
|
118 |
+
#multicalendar .ui-datepicker .ui-datepicker-buttonpane { background-image: none; margin: .7em 0 0 0; padding:0 .2em; }
|
119 |
+
#multicalendar .ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; }
|
120 |
+
#multicalendar .ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; }
|
121 |
+
#multicalendar .ui-widget-header,#multicalendar .fshowdatep {color: #nnnnnn2;}
|
122 |
+
|
123 |
+
/* with multiple calendars */
|
124 |
+
#multicalendar .ui-datepicker.ui-datepicker-multi { width:auto; }
|
125 |
+
#multicalendar .ui-datepicker-multi .ui-datepicker-group { float:left;border:1px solid #D8D8D8;margin:1px;}
|
126 |
+
#multicalendar .ui-datepicker-multi .ui-datepicker-group table {width:98.5%;border:0px;margin:0px 2px 5px 2px;}
|
127 |
+
#multicalendar .ui-datepicker-multi .ui-datepicker-group .ui-datepicker-header{border: 0px;border-bottom: 1px solid #D8D8D8; }
|
128 |
+
#multicalendar .ui-datepicker-multi-2 .ui-datepicker-group { width:50%; }
|
129 |
+
#multicalendar .ui-datepicker-multi-3 .ui-datepicker-group { width:33.3%; }
|
130 |
+
#multicalendar .ui-datepicker-multi-4 .ui-datepicker-group { width:25%; }
|
131 |
+
#multicalendar .ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; }
|
132 |
+
#multicalendar .ui-datepicker-row-break { clear:both; width:100%; }
|
133 |
+
/* end multiple calendars */
|
134 |
+
.mv_dlg #mv_corner{position:absolute;top:-19px;left:10px;background: url(../images/corner.png) no-repeat;width:35px;height:19px;z-index:200000}
|
135 |
+
.mv_dlg.mv_dlg_editevent #mv_corner{display:none}
|
136 |
+
.ui-icon-closethick,#multicalendar .ui-icon.ui-icon-closethick { background: url(../images/close.png) no-repeat;display: block; text-indent: -99999px; overflow: hidden;}
|
137 |
+
.mv_dlg.ui-dialog { padding: 0px; width: 300px;}
|
138 |
+
.mv_dlg.ui-dialog .ui-dialog-titlebar { background:#fff;padding: 5px 5px 0px 0px;position: relative;border:2px solid #D8D8D8;border-top:1px solid #D8D8D8;border-bottom:0px;margin-top:0px;z-index:20000;height:1px;}
|
139 |
+
.mv_dlg.ui-dialog .ui-dialog-title { float: left; margin: .1em 16px .1em 0; }
|
140 |
+
.mv_dlg.ui-dialog .ui-dialog-titlebar-close { position: absolute; right: 1px; top: 8px; width: 19px;height:20px;z-index:1 }
|
141 |
+
.mv_dlg.ui-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; }
|
142 |
+
.mv_dlg.ui-dialog .ui-dialog-content { background:#fff;position: relative; border:2px solid #d8d8d8;border-bottom:3px solid #d8d8d8;border-top:0px; padding: .5em 1em; zoom: 1; }
|
143 |
+
.mv_dlg.ui-dialog .ui-dialog-buttonpane { text-align: left; border-width: 1px 0 0 0; background-image: none; margin: .5em 0 0 0; padding: .3em 1em .5em .4em; }
|
144 |
+
.mv_dlg.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { float: right; }
|
145 |
+
.mv_dlg.ui-dialog .ui-dialog-buttonpane button { margin: .5em .4em .5em 0; cursor: pointer; }
|
146 |
+
.mv_dlg.ui-dialog .ui-resizable-se { width: 14px; height: 14px; right: 3px; bottom: 3px; }
|
147 |
+
.mv_dlg.ui-dialog .ui-dialog-titlebar span.ui-dialog-title {display:none}
|
148 |
+
.mv_dlg.ui-draggable .ui-dialog-titlebar { cursor: move; }
|
149 |
+
.mv_dlg .mv_dlg_nmonth_title{font-weight:bold}
|
150 |
+
.mv_dlg .textbox-fill-input{width:95%;padding:2px;}
|
151 |
+
.mv_dlg .cb-example{font-style:italic;font-size:80%}
|
152 |
+
.mv_dlg .bbit-cal-buddle-event{font-weight:bold}
|
153 |
+
.mv_dlg .lk{text-decoration:underline;color:#0065CC;cursor: pointer;}
|
154 |
+
.mv_dlg .dialogNMonth_event{position:relative;}
|
155 |
+
.mv_dlg .dialogNMonth_event_links{position:absolute;display:none;left:6px;top:4px;}
|
156 |
+
.mv_dlg .dialogNMonth_event_links a,a.dlgNMonth_createlink{border:1px solid #nnnnnn1;background-color:#nnnnnn6;padding:0px 6px 0px 6px;text-decoration:none;color:#333;margin-right:5px;}
|
157 |
+
.mv_dlg .dialogNMonth_event_links a:hover,a.dlgNMonth_createlink:hover{text-decoration:none;}
|
158 |
+
.mv_dlg .dialogNMonth_event_content{padding:3px 0px 3px 6px;margin-bottom:13px;min-height:20px;border:1px solid #fff;}
|
159 |
+
.mv_dlg .dialogNMonth_event:hover .dialogNMonth_event_links{display:block;opacity:1;filter:alpha(opacity=100)}
|
160 |
+
.mv_dlg .dialogNMonth_event:hover .dialogNMonth_event_content{border:1px dashed #ccc;}
|
DC_MultiViewCal/css/colorselect.css
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.x-color-palette {cursor: pointer;background-color:#ffffff;border:solid 1px #999;padding:0px;}
|
2 |
+
.x-color-palette a {border-top: 1px solid #fff;border-left: 1px solid #fff;float: left;text-decoration: none;-moz-outline: 0 none;outline: 0 none;cursor: pointer;margin:0px;padding:0px;}
|
3 |
+
.x-color-palette a:hover {border-top: 1px solid #555;border-left: 1px solid #555;}
|
4 |
+
.x-color-palette a em span{padding:0px;cursor: pointer;display: block;height: 11px;line-height: 11px;width: 11px;}
|
5 |
+
.x-color-palette em {display: block;}
|
6 |
+
.containtdiv{border:solid 1px #3C7FB1;background:#ffffff url("images/dropdown.png") no-repeat 35px center;cursor:pointer;overflow:hidden;float:left;width:48px;height:19px;margin-top:1px;margin-right:2px;}
|
7 |
+
.leftdiv{width :25px;height:13px;margin:2px 2px 0px 2px;font-size:1px;}
|
DC_MultiViewCal/css/cupertino/calendar.css
ADDED
@@ -0,0 +1,160 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
#AED0EA header
|
3 |
+
#E2EFF8 cells
|
4 |
+
#E2EFF8 today and nonmonth
|
5 |
+
#62BBE8 active
|
6 |
+
*/
|
7 |
+
#multicalendar {border:1px solid #AED0EA;padding:5px;background:#E2EFF8;color:#333;font-family: Lucida Grande, Lucida Sans, Arial, sans-serif; font-size: 1.1em;}
|
8 |
+
#multicalendar.calendaredition {border:0px;background:none;padding:0px}
|
9 |
+
#multicalendar .fbutton {border:1px solid #AED0EA;background:#E2EFF8;padding-bottom:1px;color:#000000;font-weight:normal}
|
10 |
+
#multicalendar .fbutton.ui-state-active {background:#62BBE8;color:#FFFFFF;border:1px solid #AED0EA;}
|
11 |
+
#multicalendar .gridcontainercover {border:1px solid #AED0EA;padding:5px;background:#fff}
|
12 |
+
#multicalendar .ui-datepicker .ui-datepicker-other-month {color:#CFCFCF}
|
13 |
+
#multicalendar .calmain {background:#AED0EA}
|
14 |
+
#multicalendar .scolltimeevent {position:relative;overflow-y:scroll;overflow-x:hidden;border-top:1px solid #D8D8D8;border-left:1px solid #D8D8D8;border-bottom:1px solid #fff;padding:0;font-size:12px;line-height:normal;}
|
15 |
+
#multicalendar .wk-top {table-layout:fixed;width:100%;overflow:hidden;font-size:12px;line-height:10px;}
|
16 |
+
#multicalendar .wk-dayname {font-weight:normal;color:#333;padding:2px 4px;margin-left:4px;white-space:nowrap}
|
17 |
+
#multicalendar .wk-daylink {cursor:pointer;}
|
18 |
+
#multicalendar .wk-daylink:hover {text-decoration:underline;}
|
19 |
+
#multicalendar .wk-allday {font-size:12px;line-height:14px;border-top:1px solid #D8D8D8;border-right:1px solid #D8D8D8;}
|
20 |
+
#multicalendar .wk-alldayList {background:#fff;font-size:12px;line-height:14px;border:1px solid #D8D8D8;border-left:4px solid #D8D8D8;border-right:4px solid #D8D8D8;padding:1px;text-align:center;color:#AED0EA;}
|
21 |
+
#multicalendar .wk-dayWithColumns {text-align:center;color:#fff;}
|
22 |
+
#multicalendar .wk-allday .st-c {padding-left:0;padding-right:0;border-left:1px solid #D8D8D8;}
|
23 |
+
#multicalendar .wk-allday .wk-allday-last .st-c {border-bottom:1px solid #D8D8D8;}
|
24 |
+
#multicalendar .st-grid {position:relative;table-layout:fixed;width:100%;}
|
25 |
+
#multicalendar .st-c {padding:1px 1px 0 2px;vertical-align:top;font-family:Verdana, sans-serif}
|
26 |
+
#multicalendar .st-s {padding-bottom:2px;cursor:default;}
|
27 |
+
.tg-timedevents {background-color:#fff;table-layout:fixed;width:100%;margin-top:-1px}
|
28 |
+
.tg-times {padding:0;font-family:Arial;font-size:11px;text-align:right;vertical-align:top;padding-right:1px;padding-top:1px;overflow:hidden;}
|
29 |
+
.tg-time {border-bottom:1px solid #ddd;padding-right:2px;text-align:center;}
|
30 |
+
.tg-col {overflow:hidden;vertical-align:top;}
|
31 |
+
.tg-col-overlaywrapper {position:relative;height:0}
|
32 |
+
.tg-col-eventwrapper {position:relative;cursor:default;margin-right:10px;border-left:1px solid #D8D8D8;}
|
33 |
+
.tg-today {background-color:#ffc;}
|
34 |
+
.tg-spanningwrapper {position:relative;margin-left:3px;height:1px;top:1px;}
|
35 |
+
.tg-hourmarkers {position:absolute;width:100%}
|
36 |
+
.tg-dualmarker {border-top:1px solid #ddd;height:20px;line-height:20px;border-bottom:1px dotted #ddd;margin-bottom:20px;}
|
37 |
+
.tg-nowmarker {position:absolute;left:0;width:100%;top:0;height:0;border-top:2px solid red;overflow:hidden;opacity:0.4;filter:alpha(opacity=40);}
|
38 |
+
.chip {position:absolute;overflow:hidden;cursor:default;color:#fff;-moz-user-select:none;}
|
39 |
+
.chip dl {margin:0;padding-bottom:1px;border-left:1px solid;border-right:1px solid;overflow:hidden}
|
40 |
+
.chip dt {margin-top:-1px;font:bold 80%/normal Verdana, Sans-serif;white-space:nowrap;overflow:hidden;padding-left:1px;text-align:left;}
|
41 |
+
.chip a:link, .chip a:visited, .chip a:active {text-decoration:none;color:#fff}
|
42 |
+
.ie6 .chip dl {zoom:1}
|
43 |
+
.ie6 .chip dt {width:100%;margin-right:-1px}
|
44 |
+
.chip dd {margin:0;overflow:hidden;padding:0 1px;font:100%/1.3em Verdana, Sans-serif;text-align:left;word-wrap:break-word}
|
45 |
+
.cb1, .cb2 {border-style:solid;overflow:hidden;}
|
46 |
+
.cb1 {height:1px;margin:0 1px;border-width:0 1px}
|
47 |
+
.cb2 {height:0;margin:0 2px;border-width:0 0 1px}
|
48 |
+
.ct {height:0;overflow:hidden;border-style:solid;border-width:0 2px 2px;border-color:transparent}
|
49 |
+
.ie6 .ct {border-style:solid dotted}
|
50 |
+
.ff2 .cic {display:-moz-inline-box;vertical-align:bottom;position:relative;top:-2px}
|
51 |
+
.cic-tmr {background-position:-28px -57px}
|
52 |
+
.cic-rcr {background-position:-37px -50px}
|
53 |
+
.cic-spcl {background-position:-37px -57px}
|
54 |
+
.resizer {position:absolute;height:7px;line-height:7px;width:100%;bottom:0;cursor:s-resize;}
|
55 |
+
.rszr_icon {/*display:none;*/border-top:3px double white;font-size:0;line-height:0;height:0;width:10px;margin-left:auto;margin-right:auto}
|
56 |
+
.rb-o {margin:0 1px;border-width:1px 0;border-style:solid;cursor:pointer}
|
57 |
+
.rb-m {padding-left:3px;margin:0 -1px;border-width:0 1px;border-style:solid;zoom:1}
|
58 |
+
.mv-container {height:100%;position:relative;line-height:14px;white-space:nowrap;}
|
59 |
+
.mv-container th{font-size:12px;}
|
60 |
+
.st-contents, .mv-container {font-size:11px;line-height:14px}
|
61 |
+
#multicalendar .mv-daynames-table {position:absolute;table-layout:fixed;top:0;left:0;width:100%;}
|
62 |
+
#multicalendar .mv-dayname {font-weight:normal}
|
63 |
+
#multicalendar .mv-event-container {overflow:hidden;position:absolute;left:0;width:100%;top:14px;bottom:0;background:white;border-right:1px solid #D8D8D8;border-bottom:1px solid #D8D8D8;}
|
64 |
+
#multicalendar .month-row {position:absolute;left:0;width:100%;overflow:hidden}
|
65 |
+
#multicalendar .st-bg-table {position:absolute;top:0;left:0;height:100%;width:100%;table-layout:fixed}
|
66 |
+
#multicalendar .st-bg {border-left:1px solid #D8D8D8}
|
67 |
+
#multicalendar .st-bg-today {background-color:#ffc}
|
68 |
+
#multicalendar .st-dtitle {border-left:1px solid #D8D8D8;border-top:1px solid #D8D8D8;padding-right:2px;text-align:right;line-height:16px;overflow:hidden}
|
69 |
+
#multicalendar .st-dtitle-nonmonth {color:#D2D2D2}
|
70 |
+
#multicalendar .st-more {color:#FEFEFE;text-align:center;cursor:pointer;/*font-family:Arial, sans-serif*/}
|
71 |
+
#multicalendar .st-moreul {text-decoration:underline}
|
72 |
+
.cc {position:absolute;z-index:2000;border:1px solid gray;background-color:white;visibility:hidden}
|
73 |
+
.cc-title {padding:2px;font-weight:bold}
|
74 |
+
#multicalendar .st-ad-ml,#multicalendar .st-ad-mr {position:relative;top:2px;margin-bottom:-8px;height:0;width:0;line-height:0;font-size:0;border-top:4px dotted;border-top:4px solid transparent;border-bottom:4px dotted;border-bottom:4px solid transparent}
|
75 |
+
#multicalendar .st-ad-mpad {padding-left:10px}
|
76 |
+
#multicalendar .st-ad-ml {border-right:4px solid white;margin-left:-7px;margin-right:auto}
|
77 |
+
#multicalendar .st-ad-mr {border-left:4px solid white;margin-left:auto;margin-right:3px}
|
78 |
+
.bbit-cs-split{margin-top:2px;padding:2px;border-top:solid 1px #555;}
|
79 |
+
.drag-lasso-container {POSITION: absolute;WIDTH: 0px;HEIGHT: 0px;TOP: 0px;LEFT: 0px}
|
80 |
+
.drag-lasso {POSITION: absolute;FILTER: alpha(opacity=50);LINE-HEIGHT: 0;BACKGROUND-COLOR: #AED0EA;FONT-SIZE: 0px;opacity: 0.5;-khtml-opacity: 0.5}
|
81 |
+
.drag-event {Z-INDEX: 1000;POSITION: absolute;FONT-FAMILY: Verdana,sans-serif;CURSOR: pointer}
|
82 |
+
.drag-chip-wrapper {Z-INDEX: 1;POSITION: absolute;WIDTH: 100%;LEFT: 0px}
|
83 |
+
.drag-chip {FILTER: alpha(opacity=80);CURSOR: pointer;opacity: .8;-khtml-opacity: .8}
|
84 |
+
.monthdayshow{cursor:pointer;}
|
85 |
+
.monthdayshow:hover{text-decoration:underline;}
|
86 |
+
.infocontainer a.ui-button,#popup_ok,#popup_cancel,#bbit-cal-AddBTN{border:1px solid #AED0EA;background-color:#E2EFF8;padding:2px 6px 5px 6px;text-decoration:none;color:#333;line-height:18px;}
|
87 |
+
#multicalendar .ui-icon,.fbutton .ui-icon,#multicalendar .ui-state-default .ui-icon{display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat;background-image: url(../images/icons_black.png);}
|
88 |
+
#multicalendar .fbutton .ui-icon-circle-triangle-w { background-position: -27px 0px;width:5px;height:8px;margin:7px 7px 0px 5px;}
|
89 |
+
#multicalendar .fbutton .ui-icon-circle-triangle-e { background-position: -32px 0px;width:5px;height:8px;margin:7px 5px 0px 7px;}
|
90 |
+
#multicalendar .ui-datepicker-prev span.ui-icon-circle-triangle-w { background-position: 0px -9px;width:7px;height:12px;background-image: url(../images/icons_black.png); }
|
91 |
+
#multicalendar .ui-datepicker-next span.ui-icon-circle-triangle-e { background-position: -7px -9px;width:7px;height:12px;background-image: url(../images/icons_black.png); }
|
92 |
+
#multicalendar .fbutton .ui-icon-new,.fbutton .ui-icon-new { background-position: 0px 0px;width:9px;height:9px;margin:5px 5px 0px 0px}
|
93 |
+
#multicalendar .fbutton .ui-icon-refresh { background-position: -9px 0px;width:9px;height:9px;margin:5px 5px 0px 0px}
|
94 |
+
#multicalendar .fbutton .ui-icon-today { background-position: -18px 0px;width:9px;height:8px;margin:6px 5px 0px 0px}
|
95 |
+
#multicalendar .ui-datepicker { padding: 0; display: none; }
|
96 |
+
#multicalendar .ui-datepicker .ui-datepicker-header{ position:relative; padding:0;border: 1px solid #AED0EA; background: #E2EFF8;margin:0;font-weight: bold; }
|
97 |
+
#multicalendar .ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 2px; width: 1.8em; height: 1.8em; }
|
98 |
+
#multicalendar .ui-datepicker .ui-datepicker-prev { top:3px;left:1px;}
|
99 |
+
#multicalendar .ui-datepicker .ui-datepicker-next { top:3px;right:1px; }
|
100 |
+
#multicalendar .ui-datepicker .ui-datepicker-prev-hover { left:1px; }
|
101 |
+
#multicalendar .ui-datepicker .ui-datepicker-next-hover { right:1px; }
|
102 |
+
#multicalendar .ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span { display: block; position: absolute; left: 50%; margin-left: -8px; top: 50%; margin-top: -8px; }
|
103 |
+
#multicalendar .ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; }
|
104 |
+
#multicalendar .ui-datepicker .ui-datepicker-title select { font-size:1em; margin:1px 0; }
|
105 |
+
#multicalendar .ui-datepicker select.ui-datepicker-month-year {width: 100%;}
|
106 |
+
#multicalendar .ui-datepicker select.ui-datepicker-month,
|
107 |
+
#multicalendar .ui-datepicker select.ui-datepicker-year { width: 49%;}
|
108 |
+
#multicalendar .ui-datepicker table {width: 100%; font-size: .9em; border-collapse: separate;border:1px solid #D8D8D8;border-top:0px;background:#fff; margin:0px;padding: 0px; }
|
109 |
+
#multicalendar .ui-datepicker th { padding: 3px 0px 3px 0px; text-align: center; font-weight: bold;border-bottom:1px solid #d8d8d8 }
|
110 |
+
#multicalendar .ui-datepicker td { padding: 1px;border:1px solid #fff }
|
111 |
+
#multicalendar .ui-datepicker td.ui-datepicker-today {background:#E0E0E0;font-weight:bold;}
|
112 |
+
#multicalendar .ui-datepicker td.ui-state-active,#multicalendar.calendaredition .ui-datepicker a.ui-state-active,#multicalendar .ui-datepicker td.ui-datepicker-today.ui-state-active{background:#DEEDF7;color:#ccc;border:1px solid #fff;}
|
113 |
+
#multicalendar .ui-datepicker td.ui-state-active a{color:#000000}
|
114 |
+
|
115 |
+
#multicalendar .ui-datepicker td.ui-state-active a,#multicalendar .ui-datepicker td.ui-state-non-active a{border:0px}
|
116 |
+
#multicalendar .ui-datepicker td.ui-datepicker-other-month{opacity:0.2;filter:alpha(opacity=20);background:none;}
|
117 |
+
#multicalendar .ui-datepicker td span, .ui-datepicker td a { color:#333; display: block; padding: 0px 4px; text-align: right; text-decoration: none; }
|
118 |
+
#multicalendar .ui-datepicker .ui-datepicker-buttonpane { background-image: none; margin: .7em 0 0 0; padding:0 .2em; }
|
119 |
+
#multicalendar .ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; }
|
120 |
+
#multicalendar .ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; }
|
121 |
+
#multicalendar .ui-widget-header,#multicalendar .fshowdatep {color: #000000;}
|
122 |
+
|
123 |
+
/* with multiple calendars */
|
124 |
+
#multicalendar .ui-datepicker.ui-datepicker-multi { width:auto; }
|
125 |
+
#multicalendar .ui-datepicker-multi .ui-datepicker-group { float:left;border:1px solid #D8D8D8;margin:1px;}
|
126 |
+
#multicalendar .ui-datepicker-multi .ui-datepicker-group table {width:98.5%;border:0px;margin:0px 2px 5px 2px;}
|
127 |
+
#multicalendar .ui-datepicker-multi .ui-datepicker-group .ui-datepicker-header{border: 0px;border-bottom: 1px solid #D8D8D8; }
|
128 |
+
#multicalendar .ui-datepicker-multi-2 .ui-datepicker-group { width:50%; }
|
129 |
+
#multicalendar .ui-datepicker-multi-3 .ui-datepicker-group { width:33.3%; }
|
130 |
+
#multicalendar .ui-datepicker-multi-4 .ui-datepicker-group { width:25%; }
|
131 |
+
#multicalendar .ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; }
|
132 |
+
#multicalendar .ui-datepicker-row-break { clear:both; width:100%; }
|
133 |
+
/* end multiple calendars */
|
134 |
+
.mv_dlg #mv_corner{position:absolute;top:-19px;left:10px;background: url(../images/corner.png) no-repeat;width:35px;height:19px;z-index:200000}
|
135 |
+
.mv_dlg.mv_dlg_editevent #mv_corner{display:none}
|
136 |
+
.ui-icon-closethick,#multicalendar .ui-icon.ui-icon-closethick { background: url(../images/close.png) no-repeat;display: block; text-indent: -99999px; overflow: hidden;}
|
137 |
+
.mv_dlg.ui-dialog { padding: 0px; width: 300px;}
|
138 |
+
.mv_dlg.ui-dialog .ui-dialog-titlebar { background:#fff;padding: 5px 5px 0px 0px;position: relative;border:2px solid #D8D8D8;border-top:1px solid #D8D8D8;border-bottom:0px;margin-top:0px;z-index:20000;height:1px;}
|
139 |
+
.mv_dlg.ui-dialog .ui-dialog-title { float: left; margin: .1em 16px .1em 0; }
|
140 |
+
.mv_dlg.ui-dialog .ui-dialog-titlebar-close { position: absolute; right: 10px; top: 8px; width: 19px;height:20px;z-index:1 }
|
141 |
+
.mv_dlg.ui-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; }
|
142 |
+
.mv_dlg.ui-dialog .ui-dialog-content { background:#fff;position: relative; border:2px solid #d8d8d8;border-bottom:3px solid #d8d8d8;border-top:0px; padding: .5em 1em; zoom: 1; }
|
143 |
+
.mv_dlg.ui-dialog .ui-dialog-buttonpane { text-align: left; border-width: 1px 0 0 0; background-image: none; margin: .5em 0 0 0; padding: .3em 1em .5em .4em; }
|
144 |
+
.mv_dlg.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { float: right; }
|
145 |
+
.mv_dlg.ui-dialog .ui-dialog-buttonpane button { margin: .5em .4em .5em 0; cursor: pointer; }
|
146 |
+
.mv_dlg.ui-dialog .ui-resizable-se { width: 14px; height: 14px; right: 3px; bottom: 3px; }
|
147 |
+
.mv_dlg.ui-dialog .ui-dialog-titlebar span.ui-dialog-title {display:none}
|
148 |
+
.mv_dlg.ui-draggable .ui-dialog-titlebar { cursor: move; }
|
149 |
+
.mv_dlg .mv_dlg_nmonth_title{font-weight:bold}
|
150 |
+
.mv_dlg .textbox-fill-input{width:95%;padding:2px;}
|
151 |
+
.mv_dlg .cb-example{font-style:italic;font-size:80%}
|
152 |
+
.mv_dlg .bbit-cal-buddle-event{font-weight:bold}
|
153 |
+
.mv_dlg .lk{text-decoration:underline;color:#0065CC;cursor: pointer;}
|
154 |
+
.mv_dlg .dialogNMonth_event{position:relative;}
|
155 |
+
.mv_dlg .dialogNMonth_event_links{position:absolute;display:none;left:6px;top:4px;}
|
156 |
+
.mv_dlg .dialogNMonth_event_links a,a.dlgNMonth_createlink{border:1px solid #AED0EA;background-color:#E2EFF8;padding:0px 6px 0px 6px;text-decoration:none;color:#333;margin-right:5px;}
|
157 |
+
.mv_dlg .dialogNMonth_event_links a:hover,a.dlgNMonth_createlink:hover{text-decoration:none;}
|
158 |
+
.mv_dlg .dialogNMonth_event_content{padding:3px 0px 3px 6px;margin-bottom:13px;min-height:20px;border:1px solid #fff;}
|
159 |
+
.mv_dlg .dialogNMonth_event:hover .dialogNMonth_event_links{display:block;opacity:1;filter:alpha(opacity=100)}
|
160 |
+
.mv_dlg .dialogNMonth_event:hover .dialogNMonth_event_content{border:1px dashed #ccc;}
|
DC_MultiViewCal/css/dropdown.css
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
input.bbit-dropdown {border:solid 1px #3C7FB1 !important;background:#ffffff url("images/dropdown.png") no-repeat 44px center;padding-right:5px;cursor:pointer;overflow:hidden;}
|
2 |
+
.dropdowncontainer {font-size:10px;padding:0;display:inline;overflow-x:hidden !important;}
|
3 |
+
.dropdowncontainer ul {list-style: none;margin: 0;padding: 0;border: none;}
|
4 |
+
.dropdowncontainer ul li {padding:0px;font-size:10px;margin: 0;list-style: none;white-space:nowrap;text-align:center;font-family:arial;cursor:default;}
|
5 |
+
.dropdowncontainer ul li.hover{background:#c3d9ff;}
|
DC_MultiViewCal/css/images/cal.gif
ADDED
Binary file
|
DC_MultiViewCal/css/images/close.png
ADDED
Binary file
|
DC_MultiViewCal/css/images/corner.png
ADDED
Binary file
|
DC_MultiViewCal/css/images/dropdown.png
ADDED
Binary file
|
DC_MultiViewCal/css/images/icons.png
ADDED
Binary file
|
DC_MultiViewCal/css/images/icons_beige.png
ADDED
Binary file
|
DC_MultiViewCal/css/images/icons_black.png
ADDED
Binary file
|
DC_MultiViewCal/css/images/icons_blue.png
ADDED
Binary file
|
DC_MultiViewCal/css/images/icons_green.png
ADDED
Binary file
|
DC_MultiViewCal/css/images/icons_orange.png
ADDED
Binary file
|
DC_MultiViewCal/css/images/icons_white.png
ADDED
Binary file
|
DC_MultiViewCal/css/images/icons_yellow.png
ADDED
Binary file
|
DC_MultiViewCal/css/images/source.png
ADDED
Binary file
|
DC_MultiViewCal/css/images/tooltop.gif
ADDED
Binary file
|
DC_MultiViewCal/css/main.css
ADDED
@@ -0,0 +1,116 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#multicalendar table,#multicalendar span,#multicalendar a{font-size:12px;font-weight:normal;}
|
2 |
+
#multicalendar .ui-corner-left,#multicalendar .ui-corner-right{border-radius:0px}
|
3 |
+
#multicalendar .nmonths div,#multicalendar .nmonths td span,#multicalendar .nmonths a{font-weight:inherit;background:none;border:inherit;color:#000}
|
4 |
+
#multicalendar .nmonths .ui-datepicker-title,#multicalendar .nmonths a{border:0px}
|
5 |
+
#multicalendar tr,#multicalendar td,#multicalendar th{border:0;text-align:left;padding:0px;}
|
6 |
+
#multicalendar table [class*=span],.row-fluid #multicalendar table [class*=span] {display: table-row;}
|
7 |
+
#multicalendar .mv-dayname,#multicalendar .wk-dayname{text-align:center;}
|
8 |
+
#multicalendar .rb-i {overflow:hidden;color:white;white-space:nowrap;width:100%}
|
9 |
+
#multicalendar .t-title {}
|
10 |
+
#multicalendar .t-loc {display:none}
|
11 |
+
#multicalendar .t-desc {display:none}
|
12 |
+
#multicalendar td.specialday {display: none;}
|
13 |
+
#multicalendar .st-more {color:#000;}
|
14 |
+
#multicalendar .uEdition {text-decoration:underline;}
|
15 |
+
/* start alert style */
|
16 |
+
#popup_container {font-size:12px;min-width: 300px; /* Dialog will be no smaller than this */_width:320px;max-width: 600px; /* Dialog will wrap after this width */background: #fff;border: solid 1px #d8d8d8;color: #000;}
|
17 |
+
#ctl, #cbl, #ctr, #cbr {display:none;}
|
18 |
+
#popup_title {font-size:12px;font-weight: bold;text-align:left;line-height: 1.9em;color: #333;border-bottom: solid 1px #d8d8d8;cursor: default;padding:0 0 0 8px;margin: 0em;}
|
19 |
+
#popup_content {background: 16px 16px no-repeat;padding: 12px;margin: 0em;}
|
20 |
+
#popup_message {padding-left: 48px;}
|
21 |
+
#popup_panel {text-align: center;margin: 1em 0em 0em 1em;}
|
22 |
+
/* end alert style */
|
23 |
+
#multicalendar .calmain,#multicalendar .ctoolbar,#multicalendar .infocontainer {margin: 0;font-size: 12px;font-family: "Lucida Grande","Lucida Sans Unicode",Arial,Verdana,sans-serif;padding: 0;width:100%;}
|
24 |
+
#multicalendar .calmain div,#multicalendar .calmain span,#multicalendar .calmain td {font-family: "Lucida Grande","Lucida Sans Unicode",Arial,Verdana,sans-serif;}
|
25 |
+
#multicalendar.calendaredition .ui-datepicker{font-family: "Lucida Grande","Lucida Sans Unicode",Arial,Verdana,sans-serif;font-size: 12px;}
|
26 |
+
#multicalendar .infocontainer input {border: solid 1px #3C7FB1;}
|
27 |
+
#multicalendar .infocontainer input[type='checkbox'] {border: none;}
|
28 |
+
#multicalendar .infocontainer textarea {border: solid 1px #3C7FB1;overflow:auto;}
|
29 |
+
/* JQuery Validation */
|
30 |
+
#multicalendar input.cusErrorPanel,#multicalendar cusErrorPanel.cusErrorPanel,#multicalendar textarea.cusErrorPanel {border:solid 1px red;}
|
31 |
+
#multicalendar div.cusErrorPanel {z-index: auto;position:absolute;width: 276px;height: 35px;overflow: hidden;text-indent: 5px;line-height: 40px;font-size: 12px;font-family: Arial;color:#000000;background: url(images/tooltop.gif) no-repeat left top;opacity:0.9;filter: alpha(opacity=90);}
|
32 |
+
#multicalendar .infocontainer {margin:2px;padding:4px;}
|
33 |
+
#multicalendar .infocontainer .inputtext { width:100%;}
|
34 |
+
#multicalendar .infocontainer .date {width:70px;}
|
35 |
+
#multicalendar .infocontainer .fform {margin:0px;}
|
36 |
+
#multicalendar .infocontainer .fform label {display:block;margin-top:2px;padding:2px;vertical-align:top;}
|
37 |
+
#multicalendar .infocontainer .fform label.checkp {display:inline;}
|
38 |
+
#multicalendar .infocontainer .fform label span {font-weight:bold;display:block;}
|
39 |
+
#multicalendar .infocontainer .fform label span.inl{display:inline;}
|
40 |
+
#multicalendar div.calmain {position: relative;}
|
41 |
+
#multicalendar div.ptogtitle {position: absolute;z-index:100;top: 0px;right: 3px;height: 18px;padding: 1px 2px 1px 2px;font-weight: normal;}
|
42 |
+
#multicalendar div.loadicon { background:#c44;color:#fff;}
|
43 |
+
#multicalendar div.loaderror {padding: 1px 4px 1px 4px;background:#fad163;}
|
44 |
+
#multicalendar div.ctoolbar {OVERFLOW: hidden;POSITION: relative;margin-bottom:5px;}
|
45 |
+
#multicalendar div.ctoolbar div.fbutton {padding:1px;FLOAT: left;CURSOR:default;HEIGHT: 22px;margin-left:1px;margin-bottom:1px;}
|
46 |
+
#multicalendar div.ctoolbar div.fbutton div {float: left;padding: 2px 3px;}
|
47 |
+
#multicalendar div.ctoolbar div.fbutton span {float: left;display: block;}
|
48 |
+
#multicalendar div.ctoolbar div.btnseparator {float: left;margin: 3px;}
|
49 |
+
#multicalendar div.ctoolbar div.fshowdatep {padding:1px;DISPLAY: block;FLOAT: left;CURSOR:default;HEIGHT: 22px;margin-left:1px;margin-bottom:3px;}
|
50 |
+
#multicalendar div.ctoolbar div.fshowdatep div {float: left;padding: 2px 3px;}
|
51 |
+
#multicalendar div.ctoolbar div.fshowdatep span {float: left;display: block;}
|
52 |
+
.mv_dlg .bubbletime{font-weight:bold}
|
53 |
+
.ui-dialog{ position: absolute;overflow:visible;color:#000}
|
54 |
+
#multicalendar .ui-datepicker { display:block }
|
55 |
+
|
56 |
+
|
57 |
+
.ui-icon-closethick {
|
58 |
+
background-image: url(images/close.png) !important;
|
59 |
+
background-position: left top !important;
|
60 |
+
margin: 0 !important;
|
61 |
+
}
|
62 |
+
|
63 |
+
.ui-dialog .ui-dialog-titlebar-close, .ui-icon-closethick {
|
64 |
+
width: 20px !important;
|
65 |
+
height: 20px !important;
|
66 |
+
}
|
67 |
+
|
68 |
+
.ui-dialog .ui-dialog-titlebar-close {
|
69 |
+
background: none !important;
|
70 |
+
border: none !important;
|
71 |
+
}
|
72 |
+
|
73 |
+
.ui-dialog .ui-dialog-titlebar-close, .ui-dialog .ui-dialog-titlebar-close:hover {
|
74 |
+
padding: 0 !important;
|
75 |
+
}
|
76 |
+
.mv_dlg.ui-dialog .ui-dialog-titlebar-close span.ui-button-text{display:none}
|
77 |
+
#editEventContainer,#bbit-cal-buddle,#bbit-cs-buddle,.mv_dlg_nmonth{display:none}
|
78 |
+
#multicalendar table{border-bottom:0px;line-height:15px;margin:0px}
|
79 |
+
#multicalendar th{line-height:15px;}
|
80 |
+
#multicalendar div.ctoolbar div.fbutton.non-navigate {CURSOR: default;}
|
81 |
+
.mv_dlg.ui-dialog{z-index:1000000}
|
82 |
+
#multicalendar tr td{border-style:solid;border-color:#d8d8d8;border-bottom:0px;}
|
83 |
+
#multicalendar tr td{padding:0px;}
|
84 |
+
#multicalendar tr th,#multicalendar thead th{border:0px;padding:0px;background:none}
|
85 |
+
#multicalendar tr td.st-c,#multicalendar table{border:0px}
|
86 |
+
|
87 |
+
#multicalendar .calmain,#multicalendar .infocontainer {height: auto}
|
88 |
+
.mv_dlg.ui-dialog{overflow:visible}
|
89 |
+
#multicalendar .ui-datepicker table{table-layout: auto;}
|
90 |
+
#multicalendar .ui-datepicker td a{padding:0 4px}
|
91 |
+
#multicalendar .ui-datepicker .ui-state-default{font-weight:normal}
|
92 |
+
#multicalendar .list_event_content{margin:10px;padding-left:10px}
|
93 |
+
|
94 |
+
#multicalendar .listnav{margin:10px 0px}
|
95 |
+
#multicalendar a.listprevbtn,#multicalendar a.listnextbtn{text-decoration:none;padding:2px 10px;margin:0px 8px}
|
96 |
+
#multicalendar a.listbtndisabled{CURSOR: default;opacity:0.4;}
|
97 |
+
#multicalendar .readmore{white-space: nowrap;}
|
98 |
+
#multicalendar .description_large{display:none}
|
99 |
+
|
100 |
+
#multicalendar.mvlist, #multicalendar.mvlist .gridcontainercover,#multicalendar.mvlist .calmain,#multicalendar.mvNMonth, #multicalendar.mvNMonth .gridcontainercover,#multicalendar.mvNMonth .calmain{border:0px;background:none;padding:0px;margin:0px;}
|
101 |
+
#multicalendar.mvlist, #multicalendar.mvlist .gridcontainercover,#multicalendar.mvlist .calmain,#multicalendar.mvlist .calmain div,#multicalendar.mvlist .calmain span,#multicalendar.mvlist .calmain td{font-family:inherit;font-size:inherit;}
|
102 |
+
|
103 |
+
#multicalendar.mvlist{color:inherit}
|
104 |
+
#multicalendar .nav_list{display:none}
|
105 |
+
|
106 |
+
|
107 |
+
#multicalendar .readmore:after {content:"]"; padding:0px 3px; display:inline-block; text-decoration: none; color:#000;}
|
108 |
+
#multicalendar .readmore:before {content:"["; padding:0px 3px; display:inline-block; text-decoration: none; color:#000;}
|
109 |
+
#multicalendar .readmore{text-decoration:none}
|
110 |
+
#multicalendar .readmore:hover{text-decoration:underline}
|
111 |
+
#multicalendar .cc{z-index:500}
|
112 |
+
#multicalendar a{box-shadow:none !important}
|
113 |
+
#multicalendar .ui-datepicker-calendar th{color:#000}
|
114 |
+
#multicalendar .tg-time{color:#000}
|
115 |
+
#multicalendar .mv-dayname{color:#000}
|
116 |
+
#multicalendar div{line-height:normal !important}
|
DC_MultiViewCal/index.html
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<html><body bgcolor="#FFFFFF"></body></html>
|
DC_MultiViewCal/language/multiview_lang_cs_CZ.js
ADDED
@@ -0,0 +1,188 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
var i18n = jQuery.extend({}, i18n || {}, {
|
2 |
+
dcmvcal: {
|
3 |
+
dateformat: {
|
4 |
+
"fulldaykey": "ddMMyyyy",
|
5 |
+
"fulldayshow": "d L yyyy",
|
6 |
+
"fulldayvalue": "d/M/yyyy",
|
7 |
+
"Md": "W d/M",
|
8 |
+
"nDaysView": "d/M",
|
9 |
+
"listViewDate": "d L yyyy",
|
10 |
+
"Md3": "d L",
|
11 |
+
"separator": "/",
|
12 |
+
"year_index": 2,
|
13 |
+
"month_index": 1,
|
14 |
+
"day_index": 0,
|
15 |
+
"day": "d",
|
16 |
+
"sun2": "Ne",
|
17 |
+
"mon2": "Po",
|
18 |
+
"tue2": "Út",
|
19 |
+
"wed2": "St",
|
20 |
+
"thu2": "Čt",
|
21 |
+
"fri2": "Pá",
|
22 |
+
"sat2": "So",
|
23 |
+
"sun": "Ned",
|
24 |
+
"mon": "Pon",
|
25 |
+
"tue": "Úte",
|
26 |
+
"wed": "Stř",
|
27 |
+
"thu": "Čtv",
|
28 |
+
"fri": "Pát",
|
29 |
+
"sat": "Sob",
|
30 |
+
"sunday": "Sunday",
|
31 |
+
"monday": "Monday",
|
32 |
+
"tuesday": "Tuesday",
|
33 |
+
"wednesday": "Wednesday",
|
34 |
+
"thursday": "Thursday",
|
35 |
+
"friday": "Friday",
|
36 |
+
"saturday": "Saturday",
|
37 |
+
"jan": "Led",
|
38 |
+
"feb": "Úno",
|
39 |
+
"mar": "Bře",
|
40 |
+
"apr": "Dub",
|
41 |
+
"may": "Kvě",
|
42 |
+
"jun": "Čer",
|
43 |
+
"jul": "Čvec",
|
44 |
+
"aug": "Srp",
|
45 |
+
"sep": "Zář",
|
46 |
+
"oct": "Říj",
|
47 |
+
"nov": "Lis",
|
48 |
+
"dec": "Pro",
|
49 |
+
"l_jan": "Leden",
|
50 |
+
"l_feb": "Únor",
|
51 |
+
"l_mar": "Březen",
|
52 |
+
"l_apr": "Duben",
|
53 |
+
"l_may": "Květen",
|
54 |
+
"l_jun": "Červen",
|
55 |
+
"l_jul": "Červenec",
|
56 |
+
"l_aug": "Srpen",
|
57 |
+
"l_sep": "Září",
|
58 |
+
"l_oct": "Říjen",
|
59 |
+
"l_nov": "Listopad",
|
60 |
+
"l_dec": "Prosinec"
|
61 |
+
},
|
62 |
+
"no_implemented": "Neprovedeno",
|
63 |
+
"to_date_view": "Klikněte pro zobrazení aktuálního datumu",
|
64 |
+
"i_undefined": "Nedefinováno",
|
65 |
+
"allday_event": "Na celé dny",
|
66 |
+
"repeat_event": "Zopakovat",
|
67 |
+
"time": "Čas",
|
68 |
+
"event": "Rezervace",
|
69 |
+
"location": "Místo",
|
70 |
+
"participant": "Spoluúčastník",
|
71 |
+
"get_data_exception": "Výjimka pro data",
|
72 |
+
"new_event": "Nová rezervace",
|
73 |
+
"confirm_delete_event": "Chcete smazat rezervaci ? ",
|
74 |
+
"confrim_delete_event_or_all": "Chcete smazat celou opakovanou rezervaci nebo jen tuto ? \r\nKlikněte [OK] pro smazání této rezervace, klikněte [Cancel] pro smazání celé opakované rezervace",
|
75 |
+
"data_format_error": "Chybný formát ! ",
|
76 |
+
"invalid_title": "Popisek rezervace je prázdný nebo obsahuje ($<>)",
|
77 |
+
"view_no_ready": "Výpis není připraven",
|
78 |
+
"example": "například, dovolená Novákovi",
|
79 |
+
"content": "Co",
|
80 |
+
"create_event": "Vytvořit rezervaci",
|
81 |
+
"update_detail": "Upravit detaily",
|
82 |
+
"click_to_detail": "Prohlédnout detaily",
|
83 |
+
"i_delete": "Smazat",
|
84 |
+
"i_save": "Uložit",
|
85 |
+
"i_close": "Zavřít",
|
86 |
+
"day_plural": "dny",
|
87 |
+
"others": "Ostatní",
|
88 |
+
"item": "",
|
89 |
+
"loading_data":"Načítání dat ...",
|
90 |
+
"request_processed":"Požadavek se zpracovává ...",
|
91 |
+
"success":"Hotovo !",
|
92 |
+
"are_you_sure_delete":"Určitě smazat? ",
|
93 |
+
"ok":"Ok",
|
94 |
+
"cancel":"NEmazat",
|
95 |
+
"manage_the_calendar":"Upravit kalendář",
|
96 |
+
"error_occurs":"Došlo k chybě",
|
97 |
+
"color":"Barva",
|
98 |
+
"invalid_date_format":"Chybný formát datumu",
|
99 |
+
"invalid_time_format":"Chybný formát času",
|
100 |
+
"_simbol_not_allowed":"$<> nelze upravovat",
|
101 |
+
"subject":"Subjekt",
|
102 |
+
"time":"Čas",
|
103 |
+
"to":"Do",
|
104 |
+
"all_day_event":"Na celé dny",
|
105 |
+
"location":"Místo",
|
106 |
+
"remark":"Popisek",
|
107 |
+
"click_to_create_new_event":"Vytvořit novou rezervaci",
|
108 |
+
"new_event":"Nová rezervace",
|
109 |
+
"click_to_back_to_today":"Klikni pro návrat k dnešku",
|
110 |
+
"today":"Dnešek",
|
111 |
+
"sday":"Den",
|
112 |
+
"week":"Týden",
|
113 |
+
"month":"Měsíc",
|
114 |
+
"ndays":"Dny",
|
115 |
+
"list":"List",
|
116 |
+
"nmonth":"nMěsíců",
|
117 |
+
"refresh_view":"Obnovit zobrazení",
|
118 |
+
"refresh":"Obnovit",
|
119 |
+
"prev":"Zpět",
|
120 |
+
"next":"Další",
|
121 |
+
"loading":"Načítání",
|
122 |
+
"error_overlapping":"This event is overlapping another event",
|
123 |
+
"sorry_could_not_load_your_data":"Zkuste načít data znovu",
|
124 |
+
"first":"First",
|
125 |
+
"second":"Second",
|
126 |
+
"third":"Third",
|
127 |
+
"fourth":"Fourth",
|
128 |
+
"last":"last",
|
129 |
+
"repeat":"Repeat: ",
|
130 |
+
"edit":"Edit",
|
131 |
+
"edit_recurring_event":"Edit recurring event",
|
132 |
+
"would_you_like_to_change_only_this_event_all_events_in_the_series_or_this_and_all_following_events_in_the_series":"Would you like to change only this event, all events in the series, or this and all following events in the series?",
|
133 |
+
"only_this_event":"Only this event",
|
134 |
+
"all_other_events_in_the_series_will_remain_the_same":"All other events in the series will remain the same.",
|
135 |
+
"following_events":"Following events",
|
136 |
+
"this_and_all_the_following_events_will_be_changed":"This and all the following events will be changed.",
|
137 |
+
"any_changes_to_future_events_will_be_lost":"Any changes to future events will be lost.",
|
138 |
+
"all_events":"All events",
|
139 |
+
"all_events_in_the_series_will_be_changed":"All events in the series will be changed.",
|
140 |
+
"any_changes_made_to_other_events_will_be_kept":"Any changes made to other events will be kept.",
|
141 |
+
"cancel_this_change":"Cancel this change",
|
142 |
+
"delete_recurring_event":"Delete recurring event",
|
143 |
+
"would_you_like_to_delete_only_this_event_all_events_in_the_series_or_this_and_all_future_events_in_the_series":"Would you like to delete only this event, all events in the series, or this and all future events in the series?",
|
144 |
+
"only_this_instance":"Only this instance",
|
145 |
+
"all_other_events_in_the_series_will_remain":"All other events in the series will remain.",
|
146 |
+
"all_following":"All following",
|
147 |
+
"this_and_all_the_following_events_will_be_deleted":"This and all the following events will be deleted.",
|
148 |
+
"all_events_in_the_series":"All events in the series",
|
149 |
+
"all_events_in_the_series_will_be_deleted":"All events in the series will be deleted.",
|
150 |
+
"repeats":"Repeats",
|
151 |
+
"daily":"Daily",
|
152 |
+
"every_weekday_monday_to_friday":"Every weekday (Monday to Friday)",
|
153 |
+
"every_monday_wednesday_and_friday":"Every Monday, Wednesday, and Friday",
|
154 |
+
"every_tuesday_and_thursday":"Every Tuesday, and Thursday",
|
155 |
+
"weekly":"Weekly",
|
156 |
+
"monthly":"Monthly",
|
157 |
+
"yearly":"Yearly",
|
158 |
+
"repeat_every":"Repeat every:",
|
159 |
+
"weeks":"weeks",
|
160 |
+
"repeat_on":"Repeat on:",
|
161 |
+
"repeat_by":"Repeat by:",
|
162 |
+
"day_of_the_month":"day of the month",
|
163 |
+
"day_of_the_week":"day of the week",
|
164 |
+
"starts_on":"Starts on:",
|
165 |
+
"ends":"Ends:",
|
166 |
+
"never":" Never",
|
167 |
+
"after":"After",
|
168 |
+
"occurrences":"occurrences",
|
169 |
+
"summary":"Summary:",
|
170 |
+
"every":"Every",
|
171 |
+
"weekly_on_weekdays":"Weekly on weekdays",
|
172 |
+
"weekly_on_monday_wednesday_friday":"Weekly on Monday, Wednesday, Friday",
|
173 |
+
"weekly_on_tuesday_thursday":"Weekly on Tuesday, Thursday",
|
174 |
+
"on":"on",
|
175 |
+
"on_day":"on day",
|
176 |
+
"on_the":"on the",
|
177 |
+
"months":"months",
|
178 |
+
"annually":"Annually",
|
179 |
+
"years":"years",
|
180 |
+
"once":"Once",
|
181 |
+
"times":"times",
|
182 |
+
"readmore":"read more",
|
183 |
+
"readmore_less":"less",
|
184 |
+
"readmore":"read more",
|
185 |
+
"readmore_less":"less",
|
186 |
+
"until":"until"
|
187 |
+
}
|
188 |
+
});
|
DC_MultiViewCal/language/multiview_lang_da_DK.js
ADDED
@@ -0,0 +1,186 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
var i18n = jQuery.extend({}, i18n || {}, {
|
2 |
+
dcmvcal: {
|
3 |
+
dateformat: {
|
4 |
+
"fulldaykey": "ddMMyyyy",
|
5 |
+
"fulldayshow": "d L yyyy",
|
6 |
+
"fulldayvalue": "d/M/yyyy",
|
7 |
+
"Md": "W d/M",
|
8 |
+
"nDaysView": "d/M",
|
9 |
+
"listViewDate": "d L yyyy",
|
10 |
+
"Md3": "d L",
|
11 |
+
"separator": "/",
|
12 |
+
"year_index": 2,
|
13 |
+
"month_index": 1,
|
14 |
+
"day_index": 0,
|
15 |
+
"day": "d",
|
16 |
+
"sun2": "Sø",
|
17 |
+
"mon2": "Ma",
|
18 |
+
"tue2": "Ti",
|
19 |
+
"wed2": "On",
|
20 |
+
"thu2": "To",
|
21 |
+
"fri2": "Fr",
|
22 |
+
"sat2": "Sa",
|
23 |
+
"sun": "Søn",
|
24 |
+
"mon": "Man",
|
25 |
+
"tue": "Tir",
|
26 |
+
"wed": "Ons",
|
27 |
+
"thu": "Tor",
|
28 |
+
"fri": "Fre",
|
29 |
+
"sat": "Lør",
|
30 |
+
"sunday": "Søndag",
|
31 |
+
"monday": "Mandag",
|
32 |
+
"tuesday": "Tirsdag",
|
33 |
+
"wednesday": "Onsdag",
|
34 |
+
"thursday": "Torsdag",
|
35 |
+
"friday": "Fredag",
|
36 |
+
"saturday": "Lørdag",
|
37 |
+
"jan": "Jan",
|
38 |
+
"feb": "Feb",
|
39 |
+
"mar": "Mar",
|
40 |
+
"apr": "Apr",
|
41 |
+
"may": "May",
|
42 |
+
"jun": "Jun",
|
43 |
+
"jul": "Jul",
|
44 |
+
"aug": "Aug",
|
45 |
+
"sep": "Sep",
|
46 |
+
"oct": "Oct",
|
47 |
+
"nov": "Nov",
|
48 |
+
"dec": "Dec",
|
49 |
+
"l_jan": "Januar",
|
50 |
+
"l_feb": "Februar",
|
51 |
+
"l_mar": "Mars",
|
52 |
+
"l_apr": "April",
|
53 |
+
"l_may": "Mai",
|
54 |
+
"l_jun": "Juni",
|
55 |
+
"l_jul": "Juli",
|
56 |
+
"l_aug": "August",
|
57 |
+
"l_sep": "September",
|
58 |
+
"l_oct": "October",
|
59 |
+
"l_nov": "November",
|
60 |
+
"l_dec": "December"
|
61 |
+
},
|
62 |
+
"no_implemented": "Ikke indført",
|
63 |
+
"to_date_view": "Tryk for at vise dato",
|
64 |
+
"i_undefined": "Udefinert",
|
65 |
+
"allday_event": "Hele dagen",
|
66 |
+
"repeat_event": "Gentag hendelse",
|
67 |
+
"time": "Tid",
|
68 |
+
"event": "Event",
|
69 |
+
"location": "Sted",
|
70 |
+
"participant": "Deltager",
|
71 |
+
"get_data_exception": "Undtagelse, når få data",
|
72 |
+
"new_event": "Ny booking",
|
73 |
+
"confirm_delete_event": "Vil du slette? ",
|
74 |
+
"confrim_delete_event_or_all": "Ønsker du at slette alle gentagne begivenheder eller kun denne begivenhed? \or\ Klik på [OK] for at slette kun denne begivenhed. Klik på [Annuller] for at sletter alle begivenheder",
|
75 |
+
"data_format_error": "Data format error! ",
|
76 |
+
"invalid_title": "Begivenheds titel kan ikke være tom eller indeholder ($<>)",
|
77 |
+
"view_no_ready": "View er ikke klar",
|
78 |
+
"example": "eks. Møderum 14",
|
79 |
+
"content": "Hvad",
|
80 |
+
"create_event": "opret arrangement",
|
81 |
+
"update_detail": "Ændre info",
|
82 |
+
"click_to_detail": "Vis info",
|
83 |
+
"i_delete": "Slet",
|
84 |
+
"i_save": "Gem",
|
85 |
+
"i_close": "Luk",
|
86 |
+
"day_plural": "dage",
|
87 |
+
"others": "Andre",
|
88 |
+
"item": "Objekt",
|
89 |
+
"loading_data":"Henter data...",
|
90 |
+
"request_processed":"Anmodningen bliver behandlet...",
|
91 |
+
"success":"Success!",
|
92 |
+
"are_you_sure_delete":"Er du sikker du vil slette?",
|
93 |
+
"ok":"Ok",
|
94 |
+
"cancel":"Afbryd",
|
95 |
+
"manage_the_calendar":"Redigere",
|
96 |
+
"error_occurs":"opstår fejl",
|
97 |
+
"color":"Farge",
|
98 |
+
"invalid_date_format":"Ugyldig dato",
|
99 |
+
"invalid_time_format":"Ugyldig tid",
|
100 |
+
"_simbol_not_allowed":"$<> ikke tiladt",
|
101 |
+
"subject":"Emne",
|
102 |
+
"time":"Tid",
|
103 |
+
"to":"Til",
|
104 |
+
"all_day_event":"Hele dagen",
|
105 |
+
"location":"Sted",
|
106 |
+
"remark":"Beskrivelse",
|
107 |
+
"click_to_create_new_event":"Tryk for ny arrangement",
|
108 |
+
"new_event":"Ny booking",
|
109 |
+
"click_to_back_to_today":"Tilbage til i dag",
|
110 |
+
"today":"I dag",
|
111 |
+
"sday":"Dag",
|
112 |
+
"week":"Uge",
|
113 |
+
"month":"Måned",
|
114 |
+
"ndays":"Dage",
|
115 |
+
"list":"List",
|
116 |
+
"nmonth":"Måneder",
|
117 |
+
"refresh_view":"Opdater visning",
|
118 |
+
"refresh":"Opdater",
|
119 |
+
"prev":"Forrige",
|
120 |
+
"next":"Næste",
|
121 |
+
"loading":"Loader",
|
122 |
+
"error_overlapping":"Fejl - overlapper andet arrangement",
|
123 |
+
"sorry_could_not_load_your_data":"Beklager, kunne ikke hente data, prøv igen senere",
|
124 |
+
"first":"First",
|
125 |
+
"second":"Second",
|
126 |
+
"third":"Third",
|
127 |
+
"fourth":"Fourth",
|
128 |
+
"last":"last",
|
129 |
+
"repeat":"Gentag: ",
|
130 |
+
"edit":"Editer",
|
131 |
+
"edit_recurring_event":"Editerer tilbagevende arrangement",
|
132 |
+
"would_you_like_to_change_only_this_event_all_events_in_the_series_or_this_and_all_following_events_in_the_series":"Vil du kun ændre denne begivenhed, alle begivenheder i serien, eller denne og alle følgende begivenheder i serien?",
|
133 |
+
"only_this_event":"Kun dette arrangement",
|
134 |
+
"all_other_events_in_the_series_will_remain_the_same":"Alle andre begivenheder i serien vil forblive den samme.",
|
135 |
+
"following_events":"følgende begivenheder",
|
136 |
+
"this_and_all_the_following_events_will_be_changed":"Dette og alle følgende begivenheder vil blive ændret.",
|
137 |
+
"any_changes_to_future_events_will_be_lost":"Eventuelle ændringer i fremtidige begivenheder vil gå tabt.",
|
138 |
+
"all_events":"Alle arrangementer",
|
139 |
+
"all_events_in_the_series_will_be_changed":"Alle begivenheder i serien vil blive ændret.",
|
140 |
+
"any_changes_made_to_other_events_will_be_kept":"Eventuelle ændringer til andre begivenheder vil blive holdt.",
|
141 |
+
"cancel_this_change":"Annullere denne ændring",
|
142 |
+
"delete_recurring_event":"Slet tilbagevendende begivenhed",
|
143 |
+
"would_you_like_to_delete_only_this_event_all_events_in_the_series_or_this_and_all_future_events_in_the_series":"Vil du kun slette denne begivenhed, alle begivenheder i serien, eller denne og alle fremtidige begivenheder i serien?",
|
144 |
+
"only_this_instance":"Kun denne forekomst",
|
145 |
+
"all_other_events_in_the_series_will_remain":"Alle andre begivenheder i serien vil forblive.",
|
146 |
+
"all_following":"All following",
|
147 |
+
"this_and_all_the_following_events_will_be_deleted":"Dette og alle følgende begivenheder vil blive slettet.",
|
148 |
+
"all_events_in_the_series":"Alle begivenheder i serien",
|
149 |
+
"all_events_in_the_series_will_be_deleted":"Alle begivenheder i serien vil blive slettet.",
|
150 |
+
"repeats":"Gentag",
|
151 |
+
"daily":"Daglig",
|
152 |
+
"every_weekday_monday_to_friday":"Hver ugedag (mandag til fredag)",
|
153 |
+
"every_monday_wednesday_and_friday":"Hver mandag, onsdag og fredag",
|
154 |
+
"every_tuesday_and_thursday":"Hver tirsdag og torsdag",
|
155 |
+
"weekly":"ugentlig",
|
156 |
+
"monthly":"Månedlig",
|
157 |
+
"yearly":"Årlig",
|
158 |
+
"repeat_every":"Gentag hver:",
|
159 |
+
"weeks":"uge",
|
160 |
+
"repeat_on":"Gentag på:",
|
161 |
+
"repeat_by":"Gentag efter:",
|
162 |
+
"day_of_the_month":"dag i måneden",
|
163 |
+
"day_of_the_week":"dag i ugen",
|
164 |
+
"starts_on":"starter på:",
|
165 |
+
"ends":"Slutter:",
|
166 |
+
"never":" Aldrig",
|
167 |
+
"after":"Efter",
|
168 |
+
"occurrences":"hændelse",
|
169 |
+
"summary":"resumé:",
|
170 |
+
"every":"Hver",
|
171 |
+
"weekly_on_weekdays":"Ugentlig på hverdage",
|
172 |
+
"weekly_on_monday_wednesday_friday":"Weekly på mandag, onsdag, fredag",
|
173 |
+
"weekly_on_tuesday_thursday":"ugentlig tirsdag, torsdag",
|
174 |
+
"on":"på",
|
175 |
+
"on_day":"en dag",
|
176 |
+
"on_the":"på",
|
177 |
+
"months":"måned",
|
178 |
+
"annually":"Årligt",
|
179 |
+
"years":"År",
|
180 |
+
"once":"Når",
|
181 |
+
"times":"gange",
|
182 |
+
"readmore":"read more",
|
183 |
+
"readmore_less":"less",
|
184 |
+
"until":"indtil"
|
185 |
+
}
|
186 |
+
});
|
DC_MultiViewCal/language/multiview_lang_de_DE.js
ADDED
@@ -0,0 +1,188 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
var i18n = jQuery.extend({}, i18n || {}, {
|
2 |
+
dcmvcal: {
|
3 |
+
dateformat: {
|
4 |
+
"fulldaykey": "ddMMyyyy",
|
5 |
+
"fulldayshow": "d L yyyy",
|
6 |
+
"fulldayvalue": "d/M/yyyy",
|
7 |
+
"Md": "W d/M",
|
8 |
+
"nDaysView": "d/M",
|
9 |
+
"listViewDate": "d L yyyy",
|
10 |
+
"Md3": "d L",
|
11 |
+
"separator": "/",
|
12 |
+
"year_index": 2,
|
13 |
+
"month_index": 1,
|
14 |
+
"day_index": 0,
|
15 |
+
"day": "d",
|
16 |
+
"sun2": "So",
|
17 |
+
"mon2": "Mo",
|
18 |
+
"tue2": "Di",
|
19 |
+
"wed2": "Mi",
|
20 |
+
"thu2": "Do",
|
21 |
+
"fri2": "Fr",
|
22 |
+
"sat2": "Sa",
|
23 |
+
"sun": "Son",
|
24 |
+
"mon": "Mon",
|
25 |
+
"tue": "Die",
|
26 |
+
"wed": "Mit",
|
27 |
+
"thu": "Don",
|
28 |
+
"fri": "Fre",
|
29 |
+
"sat": "Sam",
|
30 |
+
"sunday": "Sunday",
|
31 |
+
"monday": "Monday",
|
32 |
+
"tuesday": "Tuesday",
|
33 |
+
"wednesday": "Wednesday",
|
34 |
+
"thursday": "Thursday",
|
35 |
+
"friday": "Friday",
|
36 |
+
"saturday": "Saturday",
|
37 |
+
"jan": "Jan",
|
38 |
+
"feb": "Feb",
|
39 |
+
"mar": "Mär",
|
40 |
+
"apr": "Apr",
|
41 |
+
"may": "Mai",
|
42 |
+
"jun": "Jun",
|
43 |
+
"jul": "Jul",
|
44 |
+
"aug": "Aug",
|
45 |
+
"sep": "Sep",
|
46 |
+
"oct": "Okt",
|
47 |
+
"nov": "Nov",
|
48 |
+
"dec": "Dez",
|
49 |
+
"l_jan": "Januar",
|
50 |
+
"l_feb": "Februar",
|
51 |
+
"l_mar": "März",
|
52 |
+
"l_apr": "April",
|
53 |
+
"l_may": "Mai",
|
54 |
+
"l_jun": "Juni",
|
55 |
+
"l_jul": "Juli",
|
56 |
+
"l_aug": "August",
|
57 |
+
"l_sep": "September",
|
58 |
+
"l_oct": "Oktober",
|
59 |
+
"l_nov": "November",
|
60 |
+
"l_dec": "Dezember"
|
61 |
+
},
|
62 |
+
"no_implemented": "Keine implementiert", //"No implemented yet",
|
63 |
+
"to_date_view": "Hier klicken, um den Blick auf das aktuelle Datum", //"Click to the view of current date",
|
64 |
+
"i_undefined": "undefiniert", //"Undefined",
|
65 |
+
"allday_event": "Ganztägig", //
|
66 |
+
"repeat_event": "Wiederholung der Veranstaltung", //"Repeat event",
|
67 |
+
"time": "Zeit", //"Time",
|
68 |
+
"event": "Veranstaltung", //"Event",
|
69 |
+
"location": "Ort", //"Location",
|
70 |
+
"participant": "Teilnehmer", //"Participant",
|
71 |
+
"get_data_exception": "Ausnahme beim Abrufen von Daten", //"Exception when getting data",
|
72 |
+
"new_event": "Neuer Termin", //"New event",
|
73 |
+
"confirm_delete_event": "Bestätigen Sie dieses Event löschen?", //"Do you confirm to delete this event? ",
|
74 |
+
"confrim_delete_event_or_all": "Wollen Sie alle wiederholen Ereignisse oder nur dieses Event löschen? \ r \ nKlicken [OK], um nur diese Veranstaltung, klicken Sie auf [Cancel] löschen Sie alle Veranstaltungen", //"Do you want to delete all repeat events or only this event? \r\nClick [OK] to delete only this event, click [Cancel] delete all events",
|
75 |
+
"data_format_error": "Data format error!", //"Data format error! ",
|
76 |
+
"invalid_title": "Titel der Veranstaltung darf nicht leer sein oder enthält ($<>)", //"Event title can not be blank or contains ($<>)",
|
77 |
+
"view_no_ready": "View ist nicht bereit", //"View is not ready",
|
78 |
+
"example": "z. B. auf seiner Tagung in Raum 107", //"e.g., meeting at room 107",
|
79 |
+
"content": "Was", //"What",
|
80 |
+
"create_event": "Neues Event", //"Create event",
|
81 |
+
"update_detail": "Korrektur", //"Edit details",
|
82 |
+
"click_to_detail": "Details anzeigen", //"View details",
|
83 |
+
"i_delete": "löschen", //"Delete",
|
84 |
+
"i_save": "speichern", //"Save",
|
85 |
+
"i_close": "in der Nähe", //"Close",
|
86 |
+
"day_plural": "Tag", //"days",
|
87 |
+
"others": "andere", //"Others",
|
88 |
+
"item": "", //"",
|
89 |
+
"loading_data":"Daten werden geladen ...", //"Loading data...",
|
90 |
+
"request_processed":"Die Anfrage wird bearbeitet ...", //"The request is being processed ...",
|
91 |
+
"success":"Success!", //"Success!",
|
92 |
+
"are_you_sure_delete":"Sind Sie sicher, dieses Event löschen", //"Are you sure to delete this event",
|
93 |
+
"ok":"Ok", //"Ok",
|
94 |
+
"cancel":"kündigen", //"Cancel",
|
95 |
+
"manage_the_calendar":"Verwalten Sie die Kalender", //"Manage The Calendar",
|
96 |
+
"error_occurs":"Fehler tritt auf", //"Error occurs",
|
97 |
+
"color":"Farbe", //"Color",
|
98 |
+
"invalid_date_format":"Ungültiges Datumsformat", //"Invalid date format",
|
99 |
+
"invalid_time_format":"Ungültige Zeit-Format", //"Invalid time format",
|
100 |
+
"_simbol_not_allowed":"$<> Nicht erlaubt", //"$<> not allowed",
|
101 |
+
"subject":"Thema", //"Subject",
|
102 |
+
"time":"Zeit", //"Time",
|
103 |
+
"to":"zu", //"To",
|
104 |
+
"all_day_event":"Ganztägig", //"All Day Event",
|
105 |
+
"location":"Ort", //"Location",
|
106 |
+
"remark":"Beschreibung", //"Description",
|
107 |
+
"click_to_create_new_event":"Klicken Sie auf New Event erstellen", //"Click to Create New Event",
|
108 |
+
"new_event":"neuen Termin", //"New Event",
|
109 |
+
"click_to_back_to_today":"Klicken Sie, um heute wieder", //"Click to back to today",
|
110 |
+
"today":"heute", //"Today",
|
111 |
+
"sday":"Tag", //"Day",
|
112 |
+
"week":"Woche", //"Week",
|
113 |
+
"month":"Monat", //"Month",
|
114 |
+
"ndays":"Tag",
|
115 |
+
"list":"List",
|
116 |
+
"nmonth":"Vorschau", //"nMonth",
|
117 |
+
"refresh_view":"Ansicht aktualisieren", //"Refresh view",
|
118 |
+
"refresh":"aktualisieren", //"Refresh",
|
119 |
+
"prev":"Zurück", //"Prev",
|
120 |
+
"next":"nächste", //"Next",
|
121 |
+
"loading":"Laden", //"Loading",
|
122 |
+
"error_overlapping":"This event is overlapping another event",
|
123 |
+
"sorry_could_not_load_your_data":"Sorry, konnte nicht geladen werden Ihre Daten, versuchen Sie es später erneut", //"Sorry, could not load your data, please try again later",
|
124 |
+
"first":"First",
|
125 |
+
"second":"Second",
|
126 |
+
"third":"Third",
|
127 |
+
"fourth":"Fourth",
|
128 |
+
"last":"last",
|
129 |
+
"repeat":"Repeat: ",
|
130 |
+
"edit":"Edit",
|
131 |
+
"edit_recurring_event":"Edit recurring event",
|
132 |
+
"would_you_like_to_change_only_this_event_all_events_in_the_series_or_this_and_all_following_events_in_the_series":"Would you like to change only this event, all events in the series, or this and all following events in the series?",
|
133 |
+
"only_this_event":"Only this event",
|
134 |
+
"all_other_events_in_the_series_will_remain_the_same":"All other events in the series will remain the same.",
|
135 |
+
"following_events":"Following events",
|
136 |
+
"this_and_all_the_following_events_will_be_changed":"This and all the following events will be changed.",
|
137 |
+
"any_changes_to_future_events_will_be_lost":"Any changes to future events will be lost.",
|
138 |
+
"all_events":"All events",
|
139 |
+
"all_events_in_the_series_will_be_changed":"All events in the series will be changed.",
|
140 |
+
"any_changes_made_to_other_events_will_be_kept":"Any changes made to other events will be kept.",
|
141 |
+
"cancel_this_change":"Cancel this change",
|
142 |
+
"delete_recurring_event":"Delete recurring event",
|
143 |
+
"would_you_like_to_delete_only_this_event_all_events_in_the_series_or_this_and_all_future_events_in_the_series":"Would you like to delete only this event, all events in the series, or this and all future events in the series?",
|
144 |
+
"only_this_instance":"Only this instance",
|
145 |
+
"all_other_events_in_the_series_will_remain":"All other events in the series will remain.",
|
146 |
+
"all_following":"All following",
|
147 |
+
"this_and_all_the_following_events_will_be_deleted":"This and all the following events will be deleted.",
|
148 |
+
"all_events_in_the_series":"All events in the series",
|
149 |
+
"all_events_in_the_series_will_be_deleted":"All events in the series will be deleted.",
|
150 |
+
"repeats":"Repeats",
|
151 |
+
"daily":"Daily",
|
152 |
+
"every_weekday_monday_to_friday":"Every weekday (Monday to Friday)",
|
153 |
+
"every_monday_wednesday_and_friday":"Every Monday, Wednesday, and Friday",
|
154 |
+
"every_tuesday_and_thursday":"Every Tuesday, and Thursday",
|
155 |
+
"weekly":"Weekly",
|
156 |
+
"monthly":"Monthly",
|
157 |
+
"yearly":"Yearly",
|
158 |
+
"repeat_every":"Repeat every:",
|
159 |
+
"weeks":"weeks",
|
160 |
+
"repeat_on":"Repeat on:",
|
161 |
+
"repeat_by":"Repeat by:",
|
162 |
+
"day_of_the_month":"day of the month",
|
163 |
+
"day_of_the_week":"day of the week",
|
164 |
+
"starts_on":"Starts on:",
|
165 |
+
"ends":"Ends:",
|
166 |
+
"never":" Never",
|
167 |
+
"after":"After",
|
168 |
+
"occurrences":"occurrences",
|
169 |
+
"summary":"Summary:",
|
170 |
+
"every":"Every",
|
171 |
+
"weekly_on_weekdays":"Weekly on weekdays",
|
172 |
+
"weekly_on_monday_wednesday_friday":"Weekly on Monday, Wednesday, Friday",
|
173 |
+
"weekly_on_tuesday_thursday":"Weekly on Tuesday, Thursday",
|
174 |
+
"on":"on",
|
175 |
+
"on_day":"on day",
|
176 |
+
"on_the":"on the",
|
177 |
+
"months":"months",
|
178 |
+
"annually":"Annually",
|
179 |
+
"years":"years",
|
180 |
+
"once":"Once",
|
181 |
+
"times":"times",
|
182 |
+
"readmore":"read more",
|
183 |
+
"readmore_less":"less",
|
184 |
+
"readmore":"read more",
|
185 |
+
"readmore_less":"less",
|
186 |
+
"until":"until"
|
187 |
+
}
|
188 |
+
});
|
DC_MultiViewCal/language/multiview_lang_du_DU.js
ADDED
@@ -0,0 +1,188 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
var i18n = jQuery.extend({}, i18n || {}, {
|
2 |
+
dcmvcal: {
|
3 |
+
dateformat: {
|
4 |
+
"fulldaykey": "ddMMyyyy",
|
5 |
+
"fulldayshow": "d L yyyy",
|
6 |
+
"fulldayvalue": "d/M/yyyy",
|
7 |
+
"Md": "W d/M",
|
8 |
+
"nDaysView": "d/M",
|
9 |
+
"listViewDate": "d L yyyy",
|
10 |
+
"Md3": "d L",
|
11 |
+
"separator": "/",
|
12 |
+
"year_index": 2,
|
13 |
+
"month_index": 1,
|
14 |
+
"day_index": 0,
|
15 |
+
"day": "d",
|
16 |
+
"sun2": "Zo",
|
17 |
+
"mon2": "Ma",
|
18 |
+
"tue2": "Di",
|
19 |
+
"wed2": "Wo",
|
20 |
+
"thu2": "Do",
|
21 |
+
"fri2": "Vr",
|
22 |
+
"sat2": "Za",
|
23 |
+
"sun": "Zon",
|
24 |
+
"mon": "Maa",
|
25 |
+
"tue": "Din",
|
26 |
+
"wed": "Woe",
|
27 |
+
"thu": "Don",
|
28 |
+
"fri": "Vri",
|
29 |
+
"sat": "Zat",
|
30 |
+
"sunday": "Sunday",
|
31 |
+
"monday": "Monday",
|
32 |
+
"tuesday": "Tuesday",
|
33 |
+
"wednesday": "Wednesday",
|
34 |
+
"thursday": "Thursday",
|
35 |
+
"friday": "Friday",
|
36 |
+
"saturday": "Saturday",
|
37 |
+
"jan": "Jan",
|
38 |
+
"feb": "Feb",
|
39 |
+
"mar": "Maa",
|
40 |
+
"apr": "Apr",
|
41 |
+
"may": "Mei",
|
42 |
+
"jun": "Jun",
|
43 |
+
"jul": "Jul",
|
44 |
+
"aug": "Aug",
|
45 |
+
"sep": "Sep",
|
46 |
+
"oct": "Okt",
|
47 |
+
"nov": "Nov",
|
48 |
+
"dec": "dec",
|
49 |
+
"l_jan": "Januari",
|
50 |
+
"l_feb": "Februari",
|
51 |
+
"l_mar": "Maart",
|
52 |
+
"l_apr": "April",
|
53 |
+
"l_may": "Mei",
|
54 |
+
"l_jun": "Juni",
|
55 |
+
"l_jul": "Juli",
|
56 |
+
"l_aug": "Augustus",
|
57 |
+
"l_sep": "September",
|
58 |
+
"l_oct": "Oktober",
|
59 |
+
"l_nov": "November",
|
60 |
+
"l_dec": "december"
|
61 |
+
},
|
62 |
+
"no_implemented": "Nog niet geimplementeerd",
|
63 |
+
"to_date_view": "Klik hier om de vandaags datum te zien",
|
64 |
+
"i_undefined": "Onbepaald",
|
65 |
+
"allday_event": "Evenement van een hele dag",
|
66 |
+
"repeat_event": "Evenement herhalen",
|
67 |
+
"time": "Tijd",
|
68 |
+
"event": "Evenement",
|
69 |
+
"location": "Plaats",
|
70 |
+
"participant": "Deelnemer",
|
71 |
+
"get_data_exception": "Fout bij het verkrijgen van gegevens",
|
72 |
+
"new_event": "Nieuw evenement",
|
73 |
+
"confirm_delete_event": "Bevestigt U het verwijderen van dit evenement?",
|
74 |
+
"confrim_delete_event_or_all": "Wilt U alle herhaalde evenementen verwijderen, of alleen maar dit evenement? \r\n Klik op [OK] om alleen dit evenement te verwijderen, klik op [Annuleren] om alle herhaalde evenementen te verwijderen.",
|
75 |
+
"data_format_error": "Fout met het formaat van de gegevens",
|
76 |
+
"invalid_title": "Titel van het evenement kan niet leeg zijn of ($<>) bevatten",
|
77 |
+
"view_no_ready": "Afbeelding is nog niet klaar",
|
78 |
+
"example": "Bijv. Bijeenkomst in zaal 107",
|
79 |
+
"content": "Wat",
|
80 |
+
"create_event": "Maak een evenement",
|
81 |
+
"update_detail": "Details wijzigen",
|
82 |
+
"click_to_detail": "Details bekijken",
|
83 |
+
"i_delete": "Verwijderen",
|
84 |
+
"i_save": "Opslaan",
|
85 |
+
"i_close": "Sluiten",
|
86 |
+
"day_plural": "Dagen",
|
87 |
+
"others": "Anderen",
|
88 |
+
"item": "",
|
89 |
+
"loading_data":"Gegevens worden geladen...",
|
90 |
+
"request_processed":"Het verzoek wordt verwerkt....",
|
91 |
+
"success":"Succes!",
|
92 |
+
"are_you_sure_delete":"Bent U zeker dat U dit evenement wilt verwijderen?",
|
93 |
+
"ok":"OK",
|
94 |
+
"cancel":"Annuleren",
|
95 |
+
"manage_the_calendar":"Agenda beheren",
|
96 |
+
"error_occurs":"Fout",
|
97 |
+
"color":"Kleur",
|
98 |
+
"invalid_date_format":"Ongeldige datumsformaat",
|
99 |
+
"invalid_time_format":"Ongeldige tijdsformaat",
|
100 |
+
"_simbol_not_allowed":"$<> niet toegestaan",
|
101 |
+
"subject":"Onderwerp",
|
102 |
+
"time":"Tijd",
|
103 |
+
"to":"tot",
|
104 |
+
"all_day_event":"Evenement van een hele dag",
|
105 |
+
"location":"Plaats",
|
106 |
+
"remark":"Beschrijving",
|
107 |
+
"click_to_create_new_event":"Klik hier om een nieuw evenement te maken",
|
108 |
+
"new_event":"Nieuw evenement",
|
109 |
+
"click_to_back_to_today":"Klik hier om terug te gaan naar vandaag",
|
110 |
+
"today":"Vandaag",
|
111 |
+
"sday":"Dag",
|
112 |
+
"week":"Week",
|
113 |
+
"month":"Maand",
|
114 |
+
"ndays":"Dag",
|
115 |
+
"list":"List",
|
116 |
+
"nmonth":"nMaand",
|
117 |
+
"refresh_view":"Uitzicht vernieuwen",
|
118 |
+
"refresh":"Verversen",
|
119 |
+
"prev":"Vorige",
|
120 |
+
"next":"Volg.",
|
121 |
+
"loading":"Uw gegevens worden geladen.",
|
122 |
+
"error_overlapping":"This event is overlapping another event",
|
123 |
+
"sorry_could_not_load_your_data":"Uw gegevens kunnen helaas niet geladen worden, probeer het later nog eens.",
|
124 |
+
"first":"First",
|
125 |
+
"second":"Second",
|
126 |
+
"third":"Third",
|
127 |
+
"fourth":"Fourth",
|
128 |
+
"last":"last",
|
129 |
+
"repeat":"Repeat: ",
|
130 |
+
"edit":"Edit",
|
131 |
+
"edit_recurring_event":"Edit recurring event",
|
132 |
+
"would_you_like_to_change_only_this_event_all_events_in_the_series_or_this_and_all_following_events_in_the_series":"Would you like to change only this event, all events in the series, or this and all following events in the series?",
|
133 |
+
"only_this_event":"Only this event",
|
134 |
+
"all_other_events_in_the_series_will_remain_the_same":"All other events in the series will remain the same.",
|
135 |
+
"following_events":"Following events",
|
136 |
+
"this_and_all_the_following_events_will_be_changed":"This and all the following events will be changed.",
|
137 |
+
"any_changes_to_future_events_will_be_lost":"Any changes to future events will be lost.",
|
138 |
+
"all_events":"All events",
|
139 |
+
"all_events_in_the_series_will_be_changed":"All events in the series will be changed.",
|
140 |
+
"any_changes_made_to_other_events_will_be_kept":"Any changes made to other events will be kept.",
|
141 |
+
"cancel_this_change":"Cancel this change",
|
142 |
+
"delete_recurring_event":"Delete recurring event",
|
143 |
+
"would_you_like_to_delete_only_this_event_all_events_in_the_series_or_this_and_all_future_events_in_the_series":"Would you like to delete only this event, all events in the series, or this and all future events in the series?",
|
144 |
+
"only_this_instance":"Only this instance",
|
145 |
+
"all_other_events_in_the_series_will_remain":"All other events in the series will remain.",
|
146 |
+
"all_following":"All following",
|
147 |
+
"this_and_all_the_following_events_will_be_deleted":"This and all the following events will be deleted.",
|
148 |
+
"all_events_in_the_series":"All events in the series",
|
149 |
+
"all_events_in_the_series_will_be_deleted":"All events in the series will be deleted.",
|
150 |
+
"repeats":"Repeats",
|
151 |
+
"daily":"Daily",
|
152 |
+
"every_weekday_monday_to_friday":"Every weekday (Monday to Friday)",
|
153 |
+
"every_monday_wednesday_and_friday":"Every Monday, Wednesday, and Friday",
|
154 |
+
"every_tuesday_and_thursday":"Every Tuesday, and Thursday",
|
155 |
+
"weekly":"Weekly",
|
156 |
+
"monthly":"Monthly",
|
157 |
+
"yearly":"Yearly",
|
158 |
+
"repeat_every":"Repeat every:",
|
159 |
+
"weeks":"weeks",
|
160 |
+
"repeat_on":"Repeat on:",
|
161 |
+
"repeat_by":"Repeat by:",
|
162 |
+
"day_of_the_month":"day of the month",
|
163 |
+
"day_of_the_week":"day of the week",
|
164 |
+
"starts_on":"Starts on:",
|
165 |
+
"ends":"Ends:",
|
166 |
+
"never":" Never",
|
167 |
+
"after":"After",
|
168 |
+
"occurrences":"occurrences",
|
169 |
+
"summary":"Summary:",
|
170 |
+
"every":"Every",
|
171 |
+
"weekly_on_weekdays":"Weekly on weekdays",
|
172 |
+
"weekly_on_monday_wednesday_friday":"Weekly on Monday, Wednesday, Friday",
|
173 |
+
"weekly_on_tuesday_thursday":"Weekly on Tuesday, Thursday",
|
174 |
+
"on":"on",
|
175 |
+
"on_day":"on day",
|
176 |
+
"on_the":"on the",
|
177 |
+
"months":"months",
|
178 |
+
"annually":"Annually",
|
179 |
+
"years":"years",
|
180 |
+
"once":"Once",
|
181 |
+
"times":"times",
|
182 |
+
"readmore":"read more",
|
183 |
+
"readmore_less":"less",
|
184 |
+
"readmore":"read more",
|
185 |
+
"readmore_less":"less",
|
186 |
+
"until":"until"
|
187 |
+
}
|
188 |
+
});
|
DC_MultiViewCal/language/multiview_lang_en_GB.js
ADDED
@@ -0,0 +1,186 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
var i18n = jQuery.extend({}, i18n || {}, {
|
2 |
+
dcmvcal: {
|
3 |
+
dateformat: {
|
4 |
+
"fulldaykey": "MMddyyyy",
|
5 |
+
"fulldayshow": "L d yyyy",
|
6 |
+
"fulldayvalue": "M/d/yyyy",
|
7 |
+
"Md": "W M/d",
|
8 |
+
"nDaysView": "M/d",
|
9 |
+
"listViewDate": "L d yyyy",
|
10 |
+
"Md3": "L d",
|
11 |
+
"separator": "/",
|
12 |
+
"year_index": 2,
|
13 |
+
"month_index": 0,
|
14 |
+
"day_index": 1,
|
15 |
+
"day": "d",
|
16 |
+
"sun2": "Su",
|
17 |
+
"mon2": "Mo",
|
18 |
+
"tue2": "Tu",
|
19 |
+
"wed2": "We",
|
20 |
+
"thu2": "Th",
|
21 |
+
"fri2": "Fr",
|
22 |
+
"sat2": "Sa",
|
23 |
+
"sun": "Sun",
|
24 |
+
"mon": "Mon",
|
25 |
+
"tue": "Tue",
|
26 |
+
"wed": "Wed",
|
27 |
+
"thu": "Thu",
|
28 |
+
"fri": "Fri",
|
29 |
+
"sat": "Sat",
|
30 |
+
"sunday": "Sunday",
|
31 |
+
"monday": "Monday",
|
32 |
+
"tuesday": "Tuesday",
|
33 |
+
"wednesday": "Wednesday",
|
34 |
+
"thursday": "Thursday",
|
35 |
+
"friday": "Friday",
|
36 |
+
"saturday": "Saturday",
|
37 |
+
"jan": "Jan",
|
38 |
+
"feb": "Feb",
|
39 |
+
"mar": "Mar",
|
40 |
+
"apr": "Apr",
|
41 |
+
"may": "May",
|
42 |
+
"jun": "Jun",
|
43 |
+
"jul": "Jul",
|
44 |
+
"aug": "Aug",
|
45 |
+
"sep": "Sep",
|
46 |
+
"oct": "Oct",
|
47 |
+
"nov": "Nov",
|
48 |
+
"dec": "Dec",
|
49 |
+
"l_jan": "January",
|
50 |
+
"l_feb": "February",
|
51 |
+
"l_mar": "March",
|
52 |
+
"l_apr": "April",
|
53 |
+
"l_may": "May",
|
54 |
+
"l_jun": "June",
|
55 |
+
"l_jul": "July",
|
56 |
+
"l_aug": "August",
|
57 |
+
"l_sep": "September",
|
58 |
+
"l_oct": "October",
|
59 |
+
"l_nov": "November",
|
60 |
+
"l_dec": "December"
|
61 |
+
},
|
62 |
+
"no_implemented": "No implemented yet",
|
63 |
+
"to_date_view": "Click to the view of current date",
|
64 |
+
"i_undefined": "Undefined",
|
65 |
+
"allday_event": "All day event",
|
66 |
+
"repeat_event": "Repeat event",
|
67 |
+
"time": "Time",
|
68 |
+
"event": "Event",
|
69 |
+
"location": "Location",
|
70 |
+
"participant": "Participant",
|
71 |
+
"get_data_exception": "Exception when getting data",
|
72 |
+
"new_event": "New event",
|
73 |
+
"confirm_delete_event": "Do you confirm to delete this event? ",
|
74 |
+
"confrim_delete_event_or_all": "Do you want to delete all repeat events or only this event? \r\nClick [OK] to delete only this event, click [Cancel] delete all events",
|
75 |
+
"data_format_error": "Data format error! ",
|
76 |
+
"invalid_title": "Event title can not be blank or contains ($<>)",
|
77 |
+
"view_no_ready": "View is not ready",
|
78 |
+
"example": "e.g., meeting at room 107",
|
79 |
+
"content": "What",
|
80 |
+
"create_event": "Create event",
|
81 |
+
"update_detail": "Edit details",
|
82 |
+
"click_to_detail": "View details",
|
83 |
+
"i_delete": "Delete",
|
84 |
+
"i_save": "Save",
|
85 |
+
"i_close": "Close",
|
86 |
+
"day_plural": "days",
|
87 |
+
"others": "Others",
|
88 |
+
"item": "",
|
89 |
+
"loading_data":"Loading data...",
|
90 |
+
"request_processed":"The request is being processed ...",
|
91 |
+
"success":"Success!",
|
92 |
+
"are_you_sure_delete":"Are you sure to delete this event",
|
93 |
+
"ok":"Ok",
|
94 |
+
"cancel":"Cancel",
|
95 |
+
"manage_the_calendar":"Manage The Calendar",
|
96 |
+
"error_occurs":"Error occurs",
|
97 |
+
"color":"Color",
|
98 |
+
"invalid_date_format":"Invalid date format",
|
99 |
+
"invalid_time_format":"Invalid time format",
|
100 |
+
"_simbol_not_allowed":"$<> not allowed",
|
101 |
+
"subject":"Subject",
|
102 |
+
"time":"Time",
|
103 |
+
"to":"To",
|
104 |
+
"all_day_event":"All Day Event",
|
105 |
+
"location":"Location",
|
106 |
+
"remark":"Description",
|
107 |
+
"click_to_create_new_event":"Click to Create New Event",
|
108 |
+
"new_event":"New Event",
|
109 |
+
"click_to_back_to_today":"Click to back to today",
|
110 |
+
"today":"Today",
|
111 |
+
"sday":"Day",
|
112 |
+
"week":"Week",
|
113 |
+
"month":"Month",
|
114 |
+
"ndays":"Days",
|
115 |
+
"list":"List",
|
116 |
+
"nmonth":"nMonth",
|
117 |
+
"refresh_view":"Refresh view",
|
118 |
+
"refresh":"Refresh",
|
119 |
+
"prev":"Prev",
|
120 |
+
"next":"Next",
|
121 |
+
"loading":"Loading",
|
122 |
+
"error_overlapping":"This event is overlapping another event",
|
123 |
+
"sorry_could_not_load_your_data":"Sorry, could not load your data, please try again later",
|
124 |
+
"first":"First",
|
125 |
+
"second":"Second",
|
126 |
+
"third":"Third",
|
127 |
+
"fourth":"Fourth",
|
128 |
+
"last":"last",
|
129 |
+
"repeat":"Repeat: ",
|
130 |
+
"edit":"Edit",
|
131 |
+
"edit_recurring_event":"Edit recurring event",
|
132 |
+
"would_you_like_to_change_only_this_event_all_events_in_the_series_or_this_and_all_following_events_in_the_series":"Would you like to change only this event, all events in the series, or this and all following events in the series?",
|
133 |
+
"only_this_event":"Only this event",
|
134 |
+
"all_other_events_in_the_series_will_remain_the_same":"All other events in the series will remain the same.",
|
135 |
+
"following_events":"Following events",
|
136 |
+
"this_and_all_the_following_events_will_be_changed":"This and all the following events will be changed.",
|
137 |
+
"any_changes_to_future_events_will_be_lost":"Any changes to future events will be lost.",
|
138 |
+
"all_events":"All events",
|
139 |
+
"all_events_in_the_series_will_be_changed":"All events in the series will be changed.",
|
140 |
+
"any_changes_made_to_other_events_will_be_kept":"Any changes made to other events will be kept.",
|
141 |
+
"cancel_this_change":"Cancel this change",
|
142 |
+
"delete_recurring_event":"Delete recurring event",
|
143 |
+
"would_you_like_to_delete_only_this_event_all_events_in_the_series_or_this_and_all_future_events_in_the_series":"Would you like to delete only this event, all events in the series, or this and all future events in the series?",
|
144 |
+
"only_this_instance":"Only this instance",
|
145 |
+
"all_other_events_in_the_series_will_remain":"All other events in the series will remain.",
|
146 |
+
"all_following":"All following",
|
147 |
+
"this_and_all_the_following_events_will_be_deleted":"This and all the following events will be deleted.",
|
148 |
+
"all_events_in_the_series":"All events in the series",
|
149 |
+
"all_events_in_the_series_will_be_deleted":"All events in the series will be deleted.",
|
150 |
+
"repeats":"Repeats",
|
151 |
+
"daily":"Daily",
|
152 |
+
"every_weekday_monday_to_friday":"Every weekday (Monday to Friday)",
|
153 |
+
"every_monday_wednesday_and_friday":"Every Monday, Wednesday, and Friday",
|
154 |
+
"every_tuesday_and_thursday":"Every Tuesday, and Thursday",
|
155 |
+
"weekly":"Weekly",
|
156 |
+
"monthly":"Monthly",
|
157 |
+
"yearly":"Yearly",
|
158 |
+
"repeat_every":"Repeat every:",
|
159 |
+
"weeks":"weeks",
|
160 |
+
"repeat_on":"Repeat on:",
|
161 |
+
"repeat_by":"Repeat by:",
|
162 |
+
"day_of_the_month":"day of the month",
|
163 |
+
"day_of_the_week":"day of the week",
|
164 |
+
"starts_on":"Starts on:",
|
165 |
+
"ends":"Ends:",
|
166 |
+
"never":" Never",
|
167 |
+
"after":"After",
|
168 |
+
"occurrences":"occurrences",
|
169 |
+
"summary":"Summary:",
|
170 |
+
"every":"Every",
|
171 |
+
"weekly_on_weekdays":"Weekly on weekdays",
|
172 |
+
"weekly_on_monday_wednesday_friday":"Weekly on Monday, Wednesday, Friday",
|
173 |
+
"weekly_on_tuesday_thursday":"Weekly on Tuesday, Thursday",
|
174 |
+
"on":"on",
|
175 |
+
"on_day":"on day",
|
176 |
+
"on_the":"on the",
|
177 |
+
"months":"months",
|
178 |
+
"annually":"Annually",
|
179 |
+
"years":"years",
|
180 |
+
"once":"Once",
|
181 |
+
"times":"times",
|
182 |
+
"readmore":"read more",
|
183 |
+
"readmore_less":"less",
|
184 |
+
"until":"until"
|
185 |
+
}
|
186 |
+
});
|
DC_MultiViewCal/language/multiview_lang_es_ES.js
ADDED
@@ -0,0 +1,193 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
var i18n = jQuery.extend({}, i18n || {}, {
|
2 |
+
dcmvcal: {
|
3 |
+
dateformat: {
|
4 |
+
"fulldaykey": "ddMMyyyy",
|
5 |
+
"fulldayshow": "d L yyyy",
|
6 |
+
"fulldayvalue": "d/M/yyyy",
|
7 |
+
"Md": "W d/M",
|
8 |
+
"nDaysView": "d/M",
|
9 |
+
"listViewDate": "d L yyyy",
|
10 |
+
"Md3": "d L",
|
11 |
+
"separator": "/",
|
12 |
+
"year_index": 2,
|
13 |
+
"month_index": 1,
|
14 |
+
"day_index": 0,
|
15 |
+
"day": "d",
|
16 |
+
"sun2": "Do",
|
17 |
+
"mon2": "Lu",
|
18 |
+
"tue2": "Ma",
|
19 |
+
"wed2": "Mi",
|
20 |
+
"thu2": "Ju",
|
21 |
+
"fri2": "Vi",
|
22 |
+
"sat2": "Sa",
|
23 |
+
"sun": "Dom",
|
24 |
+
"mon": "Lun",
|
25 |
+
"tue": "Mar",
|
26 |
+
"wed": "Mie",
|
27 |
+
"thu": "Jue",
|
28 |
+
"fri": "Vie",
|
29 |
+
"sat": "Sab",
|
30 |
+
"sunday": "Domingo",
|
31 |
+
"monday": "Lunes",
|
32 |
+
"tuesday": "Martes",
|
33 |
+
"wednesday": "Miércoles",
|
34 |
+
"thursday": "Jueves",
|
35 |
+
"friday": "Viernes",
|
36 |
+
"saturday": "Sábado",
|
37 |
+
"jan": "Ene",
|
38 |
+
"feb": "Feb",
|
39 |
+
"mar": "Mar",
|
40 |
+
"apr": "Abr",
|
41 |
+
"may": "May",
|
42 |
+
"jun": "Jun",
|
43 |
+
"jul": "Jul",
|
44 |
+
"aug": "Ago",
|
45 |
+
"sep": "Sep",
|
46 |
+
"oct": "Oct",
|
47 |
+
"nov": "Nov",
|
48 |
+
"dec": "Dic",
|
49 |
+
"l_jan": "Enero",
|
50 |
+
"l_feb": "Febrero",
|
51 |
+
"l_mar": "Marzo",
|
52 |
+
"l_apr": "Abril",
|
53 |
+
"l_may": "Mayo",
|
54 |
+
"l_jun": "Junio",
|
55 |
+
"l_jul": "Julio",
|
56 |
+
"l_aug": "Agosto",
|
57 |
+
"l_sep": "Septiembre",
|
58 |
+
"l_oct": "Octubre",
|
59 |
+
"l_nov": "Noviembre",
|
60 |
+
"l_dec": "Diciembre"
|
61 |
+
},
|
62 |
+
"no_implemented": "No implementado aun",
|
63 |
+
"to_date_view": "Click para ver la fecha actual",
|
64 |
+
"i_undefined": "Indefinido",
|
65 |
+
"allday_event": "Evento de todo el dia",
|
66 |
+
"repeat_event": "Repetir evento",
|
67 |
+
"time": "Hora",
|
68 |
+
"event": "Evento",
|
69 |
+
"location": "Ubicación",
|
70 |
+
"participant": "Participante",
|
71 |
+
"get_data_exception": "Error cargando datos",
|
72 |
+
"new_event": "Nuevo evento",
|
73 |
+
"confirm_delete_event": "Confirma que desea borrar este evento? ",
|
74 |
+
"confrim_delete_event_or_all": "Desea borrar todos las repeticiones de este evento o solo este evento? \r\nClic [OK / Aceptar] para borrar solo este evento, clic [Cancel / Cancelar] para borrar todos los eventos.",
|
75 |
+
"data_format_error": "Error de formato de datos! ",
|
76 |
+
"invalid_title": "El título del evento no puede ser vacío o contener ($<>)",
|
77 |
+
"view_no_ready": "La vista no esta lista aun",
|
78 |
+
"example": "Ej., Evento en habitacion 107",
|
79 |
+
"content": "Que",
|
80 |
+
"create_event": "Crear evento",
|
81 |
+
"update_detail": "Editar detalles",
|
82 |
+
"click_to_detail": "Ver detalles",
|
83 |
+
"i_delete": "Borrar",
|
84 |
+
"i_save": "Guardar",
|
85 |
+
"i_close": "Cerrar",
|
86 |
+
"day_plural": "días",
|
87 |
+
"others": "Otros",
|
88 |
+
"item": "",
|
89 |
+
"loading_data":"Cargando datos...",
|
90 |
+
"request_processed":"El pedido esta siendo procesado ...",
|
91 |
+
"success":"Exitoso!",
|
92 |
+
"are_you_sure_delete":"Está seguro que desea borrar este evento",
|
93 |
+
"ok":"Aceptar",
|
94 |
+
"cancel":"Cancelar",
|
95 |
+
"manage_the_calendar":"Administrar el Calendario",
|
96 |
+
"error_occurs":"Han ocurrido errores",
|
97 |
+
"color":"Color",
|
98 |
+
"invalid_date_format":"Formato de fecha invalido",
|
99 |
+
"invalid_time_format":"Formato de hora invalido",
|
100 |
+
"_simbol_not_allowed":"$<> no estan permitidos",
|
101 |
+
"subject":"Asunto",
|
102 |
+
"time":"Fecha",
|
103 |
+
"to":"A",
|
104 |
+
"all_day_event":"Evento de todo el día",
|
105 |
+
"location":"Ubicación",
|
106 |
+
"remark":"Descripción",
|
107 |
+
"click_to_create_new_event":"Click para crear nuevo Evento",
|
108 |
+
"new_event":"Nuevo Evento",
|
109 |
+
"click_to_back_to_today":"Click para ir al día de hoy",
|
110 |
+
"today":"Hoy",
|
111 |
+
"sday":"Día",
|
112 |
+
"week":"Semana",
|
113 |
+
"month":"Mes",
|
114 |
+
"ndays":"Días",
|
115 |
+
"list":"Lista",
|
116 |
+
"nmonth":"Año",
|
117 |
+
"refresh_view":"Recargar vista",
|
118 |
+
"refresh":"Recargar",
|
119 |
+
"prev":"Ant",
|
120 |
+
"next":"Sig",
|
121 |
+
"loading":"Cargando",
|
122 |
+
"error_overlapping":"Este evento se sobrepone con otro",
|
123 |
+
"sorry_could_not_load_your_data":"No se ha podido cargar sus datos, por favor pruebe nuevamente",
|
124 |
+
"first":"Primero",
|
125 |
+
"second":"Segundo",
|
126 |
+
"third":"Tercero",
|
127 |
+
"fourth":"Cuarto",
|
128 |
+
"last":"último",
|
129 |
+
"repeat":"Repetir: ",
|
130 |
+
"edit":"Editar",
|
131 |
+
"edit_recurring_event":"Editar evento recurrente",
|
132 |
+
"would_you_like_to_change_only_this_event_all_events_in_the_series_or_this_and_all_following_events_in_the_series":"¿Quiere cambiar sólo este evento, todos los eventos, o este y los siguientes de esta serie?",
|
133 |
+
"only_this_event":"Sólo este evento",
|
134 |
+
"all_other_events_in_the_series_will_remain_the_same":"El resto de eventos de esta serie se quedarán como están.",
|
135 |
+
"following_events":"Próximos eventos",
|
136 |
+
"this_and_all_the_following_events_will_be_changed":"Este y los siguientes eventos serán modificados.",
|
137 |
+
"any_changes_to_future_events_will_be_lost":"Any changes to future events will be lost.",
|
138 |
+
"all_events":"Todos los eventos",
|
139 |
+
"all_events_in_the_series_will_be_changed":"Todos los eventos de esta serie serán modificados.",
|
140 |
+
"any_changes_made_to_other_events_will_be_kept":"Cualquier otro cambio realizado a otros eventos no será modificado.",
|
141 |
+
"cancel_this_change":"Cancelar este cambio",
|
142 |
+
"delete_recurring_event":"Borrar evento recurrente",
|
143 |
+
"would_you_like_to_delete_only_this_event_all_events_in_the_series_or_this_and_all_future_events_in_the_series":"¿Quieres borrar sólo este evento, toda la serie, o sólo este y los siguientes de esta serie?",
|
144 |
+
"only_this_instance":"Sólo este evento",
|
145 |
+
"all_other_events_in_the_series_will_remain":"El resto de los eventos no serán modificados.",
|
146 |
+
"all_following":"Este y los siguientes",
|
147 |
+
"this_and_all_the_following_events_will_be_deleted":"Este y los siguientes eventos serán borrados.",
|
148 |
+
"all_events_in_the_series":"Todos los eventos",
|
149 |
+
"all_events_in_the_series_will_be_deleted":"Todos los eventos de esta serie serán eliminados.",
|
150 |
+
"repeats":"Repetir",
|
151 |
+
"daily":"Diariamente",
|
152 |
+
"every_weekday_monday_to_friday":"A diario (Lunes a Viernes)",
|
153 |
+
"every_monday_wednesday_and_friday":"Cada Viernes, Miércoles y Viernes",
|
154 |
+
"every_tuesday_and_thursday":"Cada Martes y Jueves",
|
155 |
+
"weekly":"Semanalmente",
|
156 |
+
"monthly":"Mensualmente",
|
157 |
+
"yearly":"Anualmente",
|
158 |
+
"repeat_every":"Repetir cada:",
|
159 |
+
"weeks":"semanas",
|
160 |
+
"repeat_on":"Repetir cada:",
|
161 |
+
"repeat_by":"Repetir por:",
|
162 |
+
"day_of_the_month":"día del mes",
|
163 |
+
"day_of_the_week":"día de la semana",
|
164 |
+
"starts_on":"Empieza el:",
|
165 |
+
"ends":"Acaba:",
|
166 |
+
"never":" Nunca",
|
167 |
+
"after":"Después",
|
168 |
+
"occurrences":"repeticiones",
|
169 |
+
"summary":"Resumen:",
|
170 |
+
"every":"Cada",
|
171 |
+
"weekly_on_weekdays":"Semanalmente entre semana",
|
172 |
+
"weekly_on_monday_wednesday_friday":"Semanalmente los Lunes, Miércoles y Viernes",
|
173 |
+
"weekly_on_tuesday_thursday":"Semanalmente los Martes y Jueves",
|
174 |
+
"on":"el",
|
175 |
+
"on_day":"en el día",
|
176 |
+
"on_the":"en los",
|
177 |
+
"months":"meses",
|
178 |
+
"annually":"Anualmente",
|
179 |
+
"years":"años",
|
180 |
+
"once":"Una vez",
|
181 |
+
"times":"veces",
|
182 |
+
"readmore":"ver más",
|
183 |
+
"readmore_less":"menos",
|
184 |
+
"readmore":"ver más",
|
185 |
+
"readmore_less":"menos",
|
186 |
+
"reminder_to":"Avisar a",
|
187 |
+
"reminder_before":"",
|
188 |
+
"reminder_days":"días",
|
189 |
+
"reminder_hours":"horas",
|
190 |
+
"reminder_minutes":"minutos antes.",
|
191 |
+
"until":"hasta"
|
192 |
+
}
|
193 |
+
});
|
DC_MultiViewCal/language/multiview_lang_fr_FR.js
ADDED
@@ -0,0 +1,188 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
var i18n = jQuery.extend({}, i18n || {}, {
|
2 |
+
dcmvcal: {
|
3 |
+
dateformat: {
|
4 |
+
"fulldaykey": "ddMMyyyy",
|
5 |
+
"fulldayshow": "d L yyyy",
|
6 |
+
"fulldayvalue": "d/M/yyyy",
|
7 |
+
"Md": "W d/M",
|
8 |
+
"nDaysView": "d/M",
|
9 |
+
"listViewDate": "d L yyyy",
|
10 |
+
"Md3": "d L",
|
11 |
+
"separator": "/",
|
12 |
+
"year_index": 2,
|
13 |
+
"month_index": 1,
|
14 |
+
"day_index": 0,
|
15 |
+
"day": "d",
|
16 |
+
"sun2": "Di",
|
17 |
+
"mon2": "Lu",
|
18 |
+
"tue2": "Ma",
|
19 |
+
"wed2": "Me",
|
20 |
+
"thu2": "Je",
|
21 |
+
"fri2": "Ve",
|
22 |
+
"sat2": "Sa",
|
23 |
+
"sun": "Dim",
|
24 |
+
"mon": "Lun",
|
25 |
+
"tue": "Mar",
|
26 |
+
"wed": "Mer",
|
27 |
+
"thu": "Jeu",
|
28 |
+
"fri": "Ven",
|
29 |
+
"sat": "Sam",
|
30 |
+
"sunday": "Sunday",
|
31 |
+
"monday": "Monday",
|
32 |
+
"tuesday": "Tuesday",
|
33 |
+
"wednesday": "Wednesday",
|
34 |
+
"thursday": "Thursday",
|
35 |
+
"friday": "Friday",
|
36 |
+
"saturday": "Saturday",
|
37 |
+
"jan": "Jan",
|
38 |
+
"feb": "Fév",
|
39 |
+
"mar": "Mar",
|
40 |
+
"apr": "Avr",
|
41 |
+
"may": "Mai",
|
42 |
+
"jun": "Jui",
|
43 |
+
"jul": "Jui",
|
44 |
+
"aug": "Aoû",
|
45 |
+
"sep": "Sep",
|
46 |
+
"oct": "Oct",
|
47 |
+
"nov": "Nov",
|
48 |
+
"dec": "Déc",
|
49 |
+
"l_jan": "Janvier",
|
50 |
+
"l_feb": "Février",
|
51 |
+
"l_mar": "Mars",
|
52 |
+
"l_apr": "Avril",
|
53 |
+
"l_may": "Mai",
|
54 |
+
"l_jun": "Juin",
|
55 |
+
"l_jul": "Juillet",
|
56 |
+
"l_aug": "Août",
|
57 |
+
"l_sep": "Septembre",
|
58 |
+
"l_oct": "Octobre",
|
59 |
+
"l_nov": "Novembre",
|
60 |
+
"l_dec": "Décembre"
|
61 |
+
},
|
62 |
+
"no_implemented": "Pas encore implementé",
|
63 |
+
"to_date_view": "Cliquez ici pour voir la date actuelle",
|
64 |
+
"i_undefined": "Indéfini",
|
65 |
+
"allday_event": "Evénement de toute la journée",
|
66 |
+
"repeat_event": "Répeter événement",
|
67 |
+
"time": "Heure",
|
68 |
+
"event": "Evénement",
|
69 |
+
"location": "Lieu",
|
70 |
+
"participant": "Participant",
|
71 |
+
"get_data_exception": "Erreur lors du chargement des données",
|
72 |
+
"new_event": "Nouvel événement",
|
73 |
+
"confirm_delete_event": "Confirmez-vous la supprésion de cet événement?",
|
74 |
+
"confrim_delete_event_or_all": "Voulez-vous supprimer tous les événements répétés ou seulement celui-ci? \r\n Cliquez [OK] pour supprimer seulement cet événement, et sur \"Annuler\" pour supprimer tous les événements",
|
75 |
+
"data_format_error": "Erreur de format de donnees",
|
76 |
+
"invalid_title": "Titre de l'événement ne peut être nul ou contenir ($<>)",
|
77 |
+
"view_no_ready": "La visualisation n'est pas encore prete",
|
78 |
+
"example": "par exemple, Réunion dans la chambre 107",
|
79 |
+
"content": "Quoi",
|
80 |
+
"create_event": "Créer événement",
|
81 |
+
"update_detail": "Modifier les détails",
|
82 |
+
"click_to_detail": "Voir les détails",
|
83 |
+
"i_delete": "Supprimer",
|
84 |
+
"i_save": "Enregistrer",
|
85 |
+
"i_close": "Fermer",
|
86 |
+
"day_plural": "jours",
|
87 |
+
"others": "autres",
|
88 |
+
"item": "",
|
89 |
+
"loading_data":"chargement des données...",
|
90 |
+
"request_processed":"La demande est en cours de traitement...",
|
91 |
+
"success":"Succès!",
|
92 |
+
"are_you_sure_delete":"Etes-vous sûr de vouloir supprimer cet événement?",
|
93 |
+
"ok":"Accepter",
|
94 |
+
"cancel":"Annuler",
|
95 |
+
"manage_the_calendar":"Gérer le calendrier",
|
96 |
+
"error_occurs":"Des erreurs se sont produits",
|
97 |
+
"color":"Couleur",
|
98 |
+
"invalid_date_format":"Format de date incorrect",
|
99 |
+
"invalid_time_format":"Format d'heure incorrect",
|
100 |
+
"_simbol_not_allowed":"$<> ne sont pas permis",
|
101 |
+
"subject":"Sujet",
|
102 |
+
"time":"Heure",
|
103 |
+
"to":"A",
|
104 |
+
"all_day_event":"Journée entière",
|
105 |
+
"location":"Lieu",
|
106 |
+
"remark":"Description",
|
107 |
+
"click_to_create_new_event":"Cliquer pour créer un nouvel événement",
|
108 |
+
"new_event":"Nouvel événement",
|
109 |
+
"click_to_back_to_today":"Cliquez pour retourner à aujourd'hui",
|
110 |
+
"today":"Aujourd'hui",
|
111 |
+
"sday":"Jour",
|
112 |
+
"week":"Semaine",
|
113 |
+
"month":"Mois",
|
114 |
+
"ndays":"Jours",
|
115 |
+
"list":"List",
|
116 |
+
"nmonth":"nMois",
|
117 |
+
"refresh_view":"Actualiser l'image",
|
118 |
+
"refresh":"Actualiser",
|
119 |
+
"prev":"Préc.",
|
120 |
+
"next":"Suiv.",
|
121 |
+
"loading":"Chargement en cours",
|
122 |
+
"error_overlapping":"This event is overlapping another event",
|
123 |
+
"sorry_could_not_load_your_data":"Désolé, chargement échoué, veuillez réessayez plus tard",
|
124 |
+
"first":"Première",
|
125 |
+
"second":"Deuxième",
|
126 |
+
"third":"Troisième",
|
127 |
+
"fourth":"Quatrième",
|
128 |
+
"last":"last",
|
129 |
+
"repeat":"Repeat: ",
|
130 |
+
"edit":"Edit",
|
131 |
+
"edit_recurring_event":"Edit recurring event",
|
132 |
+
"would_you_like_to_change_only_this_event_all_events_in_the_series_or_this_and_all_following_events_in_the_series":"Would you like to change only this event, all events in the series, or this and all following events in the series?",
|
133 |
+
"only_this_event":"Only this event",
|
134 |
+
"all_other_events_in_the_series_will_remain_the_same":"All other events in the series will remain the same.",
|
135 |
+
"following_events":"Following events",
|
136 |
+
"this_and_all_the_following_events_will_be_changed":"This and all the following events will be changed.",
|
137 |
+
"any_changes_to_future_events_will_be_lost":"Any changes to future events will be lost.",
|
138 |
+
"all_events":"All events",
|
139 |
+
"all_events_in_the_series_will_be_changed":"All events in the series will be changed.",
|
140 |
+
"any_changes_made_to_other_events_will_be_kept":"Any changes made to other events will be kept.",
|
141 |
+
"cancel_this_change":"Cancel this change",
|
142 |
+
"delete_recurring_event":"Delete recurring event",
|
143 |
+
"would_you_like_to_delete_only_this_event_all_events_in_the_series_or_this_and_all_future_events_in_the_series":"Would you like to delete only this event, all events in the series, or this and all future events in the series?",
|
144 |
+
"only_this_instance":"Only this instance",
|
145 |
+
"all_other_events_in_the_series_will_remain":"All other events in the series will remain.",
|
146 |
+
"all_following":"All following",
|
147 |
+
"this_and_all_the_following_events_will_be_deleted":"This and all the following events will be deleted.",
|
148 |
+
"all_events_in_the_series":"All events in the series",
|
149 |
+
"all_events_in_the_series_will_be_deleted":"All events in the series will be deleted.",
|
150 |
+
"repeats":"Repeats",
|
151 |
+
"daily":"Daily",
|
152 |
+
"every_weekday_monday_to_friday":"Every weekday (Monday to Friday)",
|
153 |
+
"every_monday_wednesday_and_friday":"Every Monday, Wednesday, and Friday",
|
154 |
+
"every_tuesday_and_thursday":"Every Tuesday, and Thursday",
|
155 |
+
"weekly":"Weekly",
|
156 |
+
"monthly":"Monthly",
|
157 |
+
"yearly":"Yearly",
|
158 |
+
"repeat_every":"Repeat every:",
|
159 |
+
"weeks":"weeks",
|
160 |
+
"repeat_on":"Repeat on:",
|
161 |
+
"repeat_by":"Repeat by:",
|
162 |
+
"day_of_the_month":"day of the month",
|
163 |
+
"day_of_the_week":"day of the week",
|
164 |
+
"starts_on":"Starts on:",
|
165 |
+
"ends":"Ends:",
|
166 |
+
"never":" Never",
|
167 |
+
"after":"After",
|
168 |
+
"occurrences":"occurrences",
|
169 |
+
"summary":"Summary:",
|
170 |
+
"every":"Every",
|
171 |
+
"weekly_on_weekdays":"Weekly on weekdays",
|
172 |
+
"weekly_on_monday_wednesday_friday":"Weekly on Monday, Wednesday, Friday",
|
173 |
+
"weekly_on_tuesday_thursday":"Weekly on Tuesday, Thursday",
|
174 |
+
"on":"on",
|
175 |
+
"on_day":"on day",
|
176 |
+
"on_the":"on the",
|
177 |
+
"months":"months",
|
178 |
+
"annually":"Annually",
|
179 |
+
"years":"years",
|
180 |
+
"once":"Once",
|
181 |
+
"times":"times",
|
182 |
+
"readmore":"read more",
|
183 |
+
"readmore_less":"less",
|
184 |
+
"readmore":"read more",
|
185 |
+
"readmore_less":"less",
|
186 |
+
"until":"until"
|
187 |
+
}
|
188 |
+
});
|
DC_MultiViewCal/language/multiview_lang_it_IT.js
ADDED
@@ -0,0 +1,188 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
var i18n = jQuery.extend({}, i18n || {}, {
|
2 |
+
dcmvcal: {
|
3 |
+
dateformat: {
|
4 |
+
"fulldaykey": "ddMMyyyy",
|
5 |
+
"fulldayshow": "d L yyyy",
|
6 |
+
"fulldayvalue": "d/M/yyyy",
|
7 |
+
"Md": "W d/M",
|
8 |
+
"nDaysView": "d/M",
|
9 |
+
"listViewDate": "d L yyyy",
|
10 |
+
"Md3": "d L",
|
11 |
+
"separator": "/",
|
12 |
+
"year_index": 2,
|
13 |
+
"month_index": 1,
|
14 |
+
"day_index": 0,
|
15 |
+
"day": "d",
|
16 |
+
"sun2": "Do",
|
17 |
+
"mon2": "Lu",
|
18 |
+
"tue2": "Ma",
|
19 |
+
"wed2": "Me",
|
20 |
+
"thu2": "Gi",
|
21 |
+
"fri2": "Ve",
|
22 |
+
"sat2": "Sa",
|
23 |
+
"sun": "Dom",
|
24 |
+
"mon": "Lun",
|
25 |
+
"tue": "Mar",
|
26 |
+
"wed": "Mer",
|
27 |
+
"thu": "Gio",
|
28 |
+
"fri": "Ven",
|
29 |
+
"sat": "Sab",
|
30 |
+
"sunday": "Sunday",
|
31 |
+
"monday": "Monday",
|
32 |
+
"tuesday": "Tuesday",
|
33 |
+
"wednesday": "Wednesday",
|
34 |
+
"thursday": "Thursday",
|
35 |
+
"friday": "Friday",
|
36 |
+
"saturday": "Saturday",
|
37 |
+
"jan": "Gen",
|
38 |
+
"feb": "Feb",
|
39 |
+
"mar": "Mar",
|
40 |
+
"apr": "Apr",
|
41 |
+
"may": "Mag",
|
42 |
+
"jun": "Giu",
|
43 |
+
"jul": "Lug",
|
44 |
+
"aug": "Ago",
|
45 |
+
"sep": "Set",
|
46 |
+
"oct": "Ott",
|
47 |
+
"nov": "Nov",
|
48 |
+
"dec": "Dic",
|
49 |
+
"l_jan": "Gennaio",
|
50 |
+
"l_feb": "Febbraio",
|
51 |
+
"l_mar": "Marzo",
|
52 |
+
"l_apr": "Aprile",
|
53 |
+
"l_may": "Maggio",
|
54 |
+
"l_jun": "Giugno",
|
55 |
+
"l_jul": "Luglio",
|
56 |
+
"l_aug": "Agosto",
|
57 |
+
"l_sep": "Settembre",
|
58 |
+
"l_oct": "Ottobre",
|
59 |
+
"l_nov": "Novembre",
|
60 |
+
"l_dec": "Dicembre"
|
61 |
+
},
|
62 |
+
"no_implemented": "Non ancora implementato",
|
63 |
+
"to_date_view": "Clicca per vedere la data corrente",
|
64 |
+
"i_undefined": "Indefinito",
|
65 |
+
"allday_event": "Evento di una giornata intera",
|
66 |
+
"repeat_event": "Ripetere evento",
|
67 |
+
"time": "Ora",
|
68 |
+
"event": "Evento",
|
69 |
+
"location": "Luogo",
|
70 |
+
"participant": "Partecipante",
|
71 |
+
"get_data_exception": "Errore di scaricamento dei dati",
|
72 |
+
"new_event": "Nuovo evento",
|
73 |
+
"confirm_delete_event": "Confirma cancellazione dell'evento?",
|
74 |
+
"confrim_delete_event_or_all": "Vuole eleminare tutti gli eventi che si ripetono oppure solo questo evento? \r\n Clicca [OK] per eliminar solo questo evento, [Annula] per eliminare tutti gli eventi.",
|
75 |
+
"data_format_error": "Errore nel formato dei dati",
|
76 |
+
"invalid_title": "Titulo dell'evento non puo essere vuoto o contenere ($<>)",
|
77 |
+
"view_no_ready": "La visualizzazzione non e pronta",
|
78 |
+
"example": "Ad esempio, Riunione en camera 107",
|
79 |
+
"content": "Che cosa",
|
80 |
+
"create_event": "Creare evento",
|
81 |
+
"update_detail": "Modificare I dettagli",
|
82 |
+
"click_to_detail": "Visualizzare I dettagli",
|
83 |
+
"i_delete": "Cancellare",
|
84 |
+
"i_save": "Salvare",
|
85 |
+
"i_close": "Chiudere",
|
86 |
+
"day_plural": "Giorno",
|
87 |
+
"others": "Altri",
|
88 |
+
"item": "",
|
89 |
+
"loading_data":"Caricando I dati...",
|
90 |
+
"request_processed":"La richiesta e in corso di elaborazione ...",
|
91 |
+
"success":"Successo!",
|
92 |
+
"are_you_sure_delete":"Sicuro di cancellare questo evento?",
|
93 |
+
"ok":"OK",
|
94 |
+
"cancel":"Cancellare",
|
95 |
+
"manage_the_calendar":"Gestire il calendario",
|
96 |
+
"error_occurs":"Errore",
|
97 |
+
"color":"Colore",
|
98 |
+
"invalid_date_format":"Formato dei dati non valido",
|
99 |
+
"invalid_time_format":"Formato della ora non valido",
|
100 |
+
"_simbol_not_allowed":"Non e permesso usare $<>",
|
101 |
+
"subject":"Soggetto",
|
102 |
+
"time":"Tempo",
|
103 |
+
"to":"A",
|
104 |
+
"all_day_event":"Evento di giornata intera",
|
105 |
+
"location":"Luogo",
|
106 |
+
"remark":"Descrizione",
|
107 |
+
"click_to_create_new_event":"Clicca per creare un nuovo evento",
|
108 |
+
"new_event":"Nuovo evento",
|
109 |
+
"click_to_back_to_today":"Clicca per tornare ad oggi",
|
110 |
+
"today":"Oggi",
|
111 |
+
"sday":"Giorno",
|
112 |
+
"week":"Settimana",
|
113 |
+
"month":"Mese",
|
114 |
+
"ndays":"Giorni",
|
115 |
+
"list":"List",
|
116 |
+
"nmonth":"nMese",
|
117 |
+
"refresh_view":"Aggiornamento della vista",
|
118 |
+
"refresh":"Rinfrescare",
|
119 |
+
"prev":"Prec.",
|
120 |
+
"next":"Sig.",
|
121 |
+
"loading":"Caricando I dati",
|
122 |
+
"error_overlapping":"This event is overlapping another event",
|
123 |
+
"sorry_could_not_load_your_data":"Spiacente, caricamento non riuscito, riprova piu tardi.",
|
124 |
+
"first":"Primo",
|
125 |
+
"second":"Secondo",
|
126 |
+
"third":"Terzo",
|
127 |
+
"fourth":"Quarto",
|
128 |
+
"last":"last",
|
129 |
+
"repeat":"Repeat: ",
|
130 |
+
"edit":"Edit",
|
131 |
+
"edit_recurring_event":"Edit recurring event",
|
132 |
+
"would_you_like_to_change_only_this_event_all_events_in_the_series_or_this_and_all_following_events_in_the_series":"Would you like to change only this event, all events in the series, or this and all following events in the series?",
|
133 |
+
"only_this_event":"Only this event",
|
134 |
+
"all_other_events_in_the_series_will_remain_the_same":"All other events in the series will remain the same.",
|
135 |
+
"following_events":"Following events",
|
136 |
+
"this_and_all_the_following_events_will_be_changed":"This and all the following events will be changed.",
|
137 |
+
"any_changes_to_future_events_will_be_lost":"Any changes to future events will be lost.",
|
138 |
+
"all_events":"All events",
|
139 |
+
"all_events_in_the_series_will_be_changed":"All events in the series will be changed.",
|
140 |
+
"any_changes_made_to_other_events_will_be_kept":"Any changes made to other events will be kept.",
|
141 |
+
"cancel_this_change":"Cancel this change",
|
142 |
+
"delete_recurring_event":"Delete recurring event",
|
143 |
+
"would_you_like_to_delete_only_this_event_all_events_in_the_series_or_this_and_all_future_events_in_the_series":"Would you like to delete only this event, all events in the series, or this and all future events in the series?",
|
144 |
+
"only_this_instance":"Only this instance",
|
145 |
+
"all_other_events_in_the_series_will_remain":"All other events in the series will remain.",
|
146 |
+
"all_following":"All following",
|
147 |
+
"this_and_all_the_following_events_will_be_deleted":"This and all the following events will be deleted.",
|
148 |
+
"all_events_in_the_series":"All events in the series",
|
149 |
+
"all_events_in_the_series_will_be_deleted":"All events in the series will be deleted.",
|
150 |
+
"repeats":"Repeats",
|
151 |
+
"daily":"Daily",
|
152 |
+
"every_weekday_monday_to_friday":"Every weekday (Monday to Friday)",
|
153 |
+
"every_monday_wednesday_and_friday":"Every Monday, Wednesday, and Friday",
|
154 |
+
"every_tuesday_and_thursday":"Every Tuesday, and Thursday",
|
155 |
+
"weekly":"Weekly",
|
156 |
+
"monthly":"Monthly",
|
157 |
+
"yearly":"Yearly",
|
158 |
+
"repeat_every":"Repeat every:",
|
159 |
+
"weeks":"weeks",
|
160 |
+
"repeat_on":"Repeat on:",
|
161 |
+
"repeat_by":"Repeat by:",
|
162 |
+
"day_of_the_month":"day of the month",
|
163 |
+
"day_of_the_week":"day of the week",
|
164 |
+
"starts_on":"Starts on:",
|
165 |
+
"ends":"Ends:",
|
166 |
+
"never":" Never",
|
167 |
+
"after":"After",
|
168 |
+
"occurrences":"occurrences",
|
169 |
+
"summary":"Summary:",
|
170 |
+
"every":"Every",
|
171 |
+
"weekly_on_weekdays":"Weekly on weekdays",
|
172 |
+
"weekly_on_monday_wednesday_friday":"Weekly on Monday, Wednesday, Friday",
|
173 |
+
"weekly_on_tuesday_thursday":"Weekly on Tuesday, Thursday",
|
174 |
+
"on":"on",
|
175 |
+
"on_day":"on day",
|
176 |
+
"on_the":"on the",
|
177 |
+
"months":"months",
|
178 |
+
"annually":"Annually",
|
179 |
+
"years":"years",
|
180 |
+
"once":"Once",
|
181 |
+
"times":"times",
|
182 |
+
"readmore":"read more",
|
183 |
+
"readmore_less":"less",
|
184 |
+
"readmore":"read more",
|
185 |
+
"readmore_less":"less",
|
186 |
+
"until":"until"
|
187 |
+
}
|
188 |
+
});
|
DC_MultiViewCal/language/multiview_lang_nb_NO.js
ADDED
@@ -0,0 +1,188 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
var i18n = jQuery.extend({}, i18n || {}, {
|
2 |
+
dcmvcal: {
|
3 |
+
dateformat: {
|
4 |
+
"fulldaykey": "ddMMyyyy",
|
5 |
+
"fulldayshow": "d L yyyy",
|
6 |
+
"fulldayvalue": "d/M/yyyy",
|
7 |
+
"Md": "W d/M",
|
8 |
+
"nDaysView": "d/M",
|
9 |
+
"listViewDate": "d L yyyy",
|
10 |
+
"Md3": "d L",
|
11 |
+
"separator": "/",
|
12 |
+
"year_index": 2,
|
13 |
+
"month_index": 1,
|
14 |
+
"day_index": 0,
|
15 |
+
"day": "d",
|
16 |
+
"sun2": "Sø",
|
17 |
+
"mon2": "Ma",
|
18 |
+
"tue2": "Ti",
|
19 |
+
"wed2": "On",
|
20 |
+
"thu2": "To",
|
21 |
+
"fri2": "Fr",
|
22 |
+
"sat2": "Sa",
|
23 |
+
"sun": "Søn",
|
24 |
+
"mon": "Man",
|
25 |
+
"tue": "Tir",
|
26 |
+
"wed": "Ons",
|
27 |
+
"thu": "Tor",
|
28 |
+
"fri": "Fre",
|
29 |
+
"sat": "Lør",
|
30 |
+
"sunday": "Sunday",
|
31 |
+
"monday": "Monday",
|
32 |
+
"tuesday": "Tuesday",
|
33 |
+
"wednesday": "Wednesday",
|
34 |
+
"thursday": "Thursday",
|
35 |
+
"friday": "Friday",
|
36 |
+
"saturday": "Saturday",
|
37 |
+
"jan": "Jan",
|
38 |
+
"feb": "Feb",
|
39 |
+
"mar": "Mar",
|
40 |
+
"apr": "Apr",
|
41 |
+
"may": "May",
|
42 |
+
"jun": "Jun",
|
43 |
+
"jul": "Jul",
|
44 |
+
"aug": "Aug",
|
45 |
+
"sep": "Sep",
|
46 |
+
"oct": "Oct",
|
47 |
+
"nov": "Nov",
|
48 |
+
"dec": "Dec",
|
49 |
+
"l_jan": "Januar",
|
50 |
+
"l_feb": "Februar",
|
51 |
+
"l_mar": "Mars",
|
52 |
+
"l_apr": "April",
|
53 |
+
"l_may": "Mai",
|
54 |
+
"l_jun": "Juni",
|
55 |
+
"l_jul": "Juli",
|
56 |
+
"l_aug": "August",
|
57 |
+
"l_sep": "September",
|
58 |
+
"l_oct": "October",
|
59 |
+
"l_nov": "November",
|
60 |
+
"l_dec": "Desember"
|
61 |
+
},
|
62 |
+
"no_implemented": "Ikke innført",
|
63 |
+
"to_date_view": "Trykk for å vise dato",
|
64 |
+
"i_undefined": "Udefinert",
|
65 |
+
"allday_event": "Hele dagen",
|
66 |
+
"repeat_event": "Repeter hendelse",
|
67 |
+
"time": "Tid",
|
68 |
+
"event": "Event",
|
69 |
+
"location": "Sted",
|
70 |
+
"participant": "Deltager",
|
71 |
+
"get_data_exception": "Exception when getting data",
|
72 |
+
"new_event": "Ny oppføring",
|
73 |
+
"confirm_delete_event": "Vil du slette? ",
|
74 |
+
"confrim_delete_event_or_all": "Do you want to delete all repeat events or only this event? \r\nClick [OK] to delete only this event, click [Cancel] delete all events",
|
75 |
+
"data_format_error": "Data format error! ",
|
76 |
+
"invalid_title": "Event title can not be blank or contains ($<>)",
|
77 |
+
"view_no_ready": "View is not ready",
|
78 |
+
"example": "eks. Møterom 14",
|
79 |
+
"content": "Hva",
|
80 |
+
"create_event": "Lag oppføring",
|
81 |
+
"update_detail": "Endre info",
|
82 |
+
"click_to_detail": "Vis info",
|
83 |
+
"i_delete": "Slett",
|
84 |
+
"i_save": "Lagre",
|
85 |
+
"i_close": "Lukk",
|
86 |
+
"day_plural": "dager",
|
87 |
+
"others": "Andre",
|
88 |
+
"item": "Objekt",
|
89 |
+
"loading_data":"Laster data...",
|
90 |
+
"request_processed":"The request is being processed ...",
|
91 |
+
"success":"Suksess!",
|
92 |
+
"are_you_sure_delete":"Er du sikker du vil slette?",
|
93 |
+
"ok":"Ok",
|
94 |
+
"cancel":"Avbryt",
|
95 |
+
"manage_the_calendar":"Redigere",
|
96 |
+
"error_occurs":"Oppstått problem",
|
97 |
+
"color":"Farge",
|
98 |
+
"invalid_date_format":"Ugylding dato",
|
99 |
+
"invalid_time_format":"Ugyldig tid",
|
100 |
+
"_simbol_not_allowed":"$<> ikke tilatt",
|
101 |
+
"subject":"Emne",
|
102 |
+
"time":"Tid",
|
103 |
+
"to":"Til",
|
104 |
+
"all_day_event":"Hele dagen",
|
105 |
+
"location":"Sted",
|
106 |
+
"remark":"Beskrivelse",
|
107 |
+
"click_to_create_new_event":"Trykk for ny oppføring",
|
108 |
+
"new_event":"Ny oppføring",
|
109 |
+
"click_to_back_to_today":"Tilbake til i dag",
|
110 |
+
"today":"I dag",
|
111 |
+
"sday":"Dag",
|
112 |
+
"week":"Uke",
|
113 |
+
"month":"Måned",
|
114 |
+
"ndays":"Dager",
|
115 |
+
"list":"List",
|
116 |
+
"nmonth":"Fremover",
|
117 |
+
"refresh_view":"Refresh visning",
|
118 |
+
"refresh":"Refresh",
|
119 |
+
"prev":"Forrige",
|
120 |
+
"next":"Neste",
|
121 |
+
"loading":"Loader",
|
122 |
+
"error_overlapping":"Denne overlapper en annen oppføring",
|
123 |
+
"sorry_could_not_load_your_data":"Beklager, kunne ikke laste data, prøv igjen senere",
|
124 |
+
"first":"First",
|
125 |
+
"second":"Second",
|
126 |
+
"third":"Third",
|
127 |
+
"fourth":"Fourth",
|
128 |
+
"last":"last",
|
129 |
+
"repeat":"Repeat: ",
|
130 |
+
"edit":"Edit",
|
131 |
+
"edit_recurring_event":"Edit recurring event",
|
132 |
+
"would_you_like_to_change_only_this_event_all_events_in_the_series_or_this_and_all_following_events_in_the_series":"Would you like to change only this event, all events in the series, or this and all following events in the series?",
|
133 |
+
"only_this_event":"Only this event",
|
134 |
+
"all_other_events_in_the_series_will_remain_the_same":"All other events in the series will remain the same.",
|
135 |
+
"following_events":"Following events",
|
136 |
+
"this_and_all_the_following_events_will_be_changed":"This and all the following events will be changed.",
|
137 |
+
"any_changes_to_future_events_will_be_lost":"Any changes to future events will be lost.",
|
138 |
+
"all_events":"All events",
|
139 |
+
"all_events_in_the_series_will_be_changed":"All events in the series will be changed.",
|
140 |
+
"any_changes_made_to_other_events_will_be_kept":"Any changes made to other events will be kept.",
|
141 |
+
"cancel_this_change":"Cancel this change",
|
142 |
+
"delete_recurring_event":"Delete recurring event",
|
143 |
+
"would_you_like_to_delete_only_this_event_all_events_in_the_series_or_this_and_all_future_events_in_the_series":"Would you like to delete only this event, all events in the series, or this and all future events in the series?",
|
144 |
+
"only_this_instance":"Only this instance",
|
145 |
+
"all_other_events_in_the_series_will_remain":"All other events in the series will remain.",
|
146 |
+
"all_following":"All following",
|
147 |
+
"this_and_all_the_following_events_will_be_deleted":"This and all the following events will be deleted.",
|
148 |
+
"all_events_in_the_series":"All events in the series",
|
149 |
+
"all_events_in_the_series_will_be_deleted":"All events in the series will be deleted.",
|
150 |
+
"repeats":"Repeats",
|
151 |
+
"daily":"Daily",
|
152 |
+
"every_weekday_monday_to_friday":"Every weekday (Monday to Friday)",
|
153 |
+
"every_monday_wednesday_and_friday":"Every Monday, Wednesday, and Friday",
|
154 |
+
"every_tuesday_and_thursday":"Every Tuesday, and Thursday",
|
155 |
+
"weekly":"Weekly",
|
156 |
+
"monthly":"Monthly",
|
157 |
+
"yearly":"Yearly",
|
158 |
+
"repeat_every":"Repeat every:",
|
159 |
+
"weeks":"weeks",
|
160 |
+
"repeat_on":"Repeat on:",
|
161 |
+
"repeat_by":"Repeat by:",
|
162 |
+
"day_of_the_month":"day of the month",
|
163 |
+
"day_of_the_week":"day of the week",
|
164 |
+
"starts_on":"Starts on:",
|
165 |
+
"ends":"Ends:",
|
166 |
+
"never":" Never",
|
167 |
+
"after":"After",
|
168 |
+
"occurrences":"occurrences",
|
169 |
+
"summary":"Summary:",
|
170 |
+
"every":"Every",
|
171 |
+
"weekly_on_weekdays":"Weekly on weekdays",
|
172 |
+
"weekly_on_monday_wednesday_friday":"Weekly on Monday, Wednesday, Friday",
|
173 |
+
"weekly_on_tuesday_thursday":"Weekly on Tuesday, Thursday",
|
174 |
+
"on":"on",
|
175 |
+
"on_day":"on day",
|
176 |
+
"on_the":"on the",
|
177 |
+
"months":"months",
|
178 |
+
"annually":"Annually",
|
179 |
+
"years":"years",
|
180 |
+
"once":"Once",
|
181 |
+
"times":"times",
|
182 |
+
"readmore":"read more",
|
183 |
+
"readmore_less":"less",
|
184 |
+
"readmore":"read more",
|
185 |
+
"readmore_less":"less",
|
186 |
+
"until":"until"
|
187 |
+
}
|
188 |
+
});
|
DC_MultiViewCal/language/multiview_lang_nl_NL.js
ADDED
@@ -0,0 +1,188 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
var i18n = jQuery.extend({}, i18n || {}, {
|
2 |
+
dcmvcal: {
|
3 |
+
dateformat: {
|
4 |
+
"fulldaykey": "ddMMyyyy",
|
5 |
+
"fulldayshow": "d L yyyy",
|
6 |
+
"fulldayvalue": "d/M/yyyy",
|
7 |
+
"Md": "W d/M",
|
8 |
+
"nDaysView": "d/M",
|
9 |
+
"listViewDate": "d L yyyy",
|
10 |
+
"Md3": "d L",
|
11 |
+
"separator": "/",
|
12 |
+
"year_index": 2,
|
13 |
+
"month_index": 1,
|
14 |
+
"day_index": 0,
|
15 |
+
"day": "d",
|
16 |
+
"sun2": "Zo",
|
17 |
+
"mon2": "Ma",
|
18 |
+
"tue2": "Di",
|
19 |
+
"wed2": "Wo",
|
20 |
+
"thu2": "Do",
|
21 |
+
"fri2": "Vr",
|
22 |
+
"sat2": "Za",
|
23 |
+
"sun": "Zon",
|
24 |
+
"mon": "Maa",
|
25 |
+
"tue": "Din",
|
26 |
+
"wed": "Woe",
|
27 |
+
"thu": "Don",
|
28 |
+
"fri": "Vri",
|
29 |
+
"sat": "Zat",
|
30 |
+
"sunday": "Sunday",
|
31 |
+
"monday": "Monday",
|
32 |
+
"tuesday": "Tuesday",
|
33 |
+
"wednesday": "Wednesday",
|
34 |
+
"thursday": "Thursday",
|
35 |
+
"friday": "Friday",
|
36 |
+
"saturday": "Saturday",
|
37 |
+
"jan": "Jan",
|
38 |
+
"feb": "Feb",
|
39 |
+
"mar": "Maa",
|
40 |
+
"apr": "Apr",
|
41 |
+
"may": "Mei",
|
42 |
+
"jun": "Jun",
|
43 |
+
"jul": "Jul",
|
44 |
+
"aug": "Aug",
|
45 |
+
"sep": "Sep",
|
46 |
+
"oct": "Okt",
|
47 |
+
"nov": "Nov",
|
48 |
+
"dec": "dec",
|
49 |
+
"l_jan": "Januari",
|
50 |
+
"l_feb": "Februari",
|
51 |
+
"l_mar": "Maart",
|
52 |
+
"l_apr": "April",
|
53 |
+
"l_may": "Mei",
|
54 |
+
"l_jun": "Juni",
|
55 |
+
"l_jul": "Juli",
|
56 |
+
"l_aug": "Augustus",
|
57 |
+
"l_sep": "September",
|
58 |
+
"l_oct": "Oktober",
|
59 |
+
"l_nov": "November",
|
60 |
+
"l_dec": "december"
|
61 |
+
},
|
62 |
+
"no_implemented": "Nog niet geimplementeerd",
|
63 |
+
"to_date_view": "Klik hier om de vandaags datum te zien",
|
64 |
+
"i_undefined": "Onbepaald",
|
65 |
+
"allday_event": "Evenement van een hele dag",
|
66 |
+
"repeat_event": "Evenement herhalen",
|
67 |
+
"time": "Tijd",
|
68 |
+
"event": "Evenement",
|
69 |
+
"location": "Plaats",
|
70 |
+
"participant": "Deelnemer",
|
71 |
+
"get_data_exception": "Fout bij het verkrijgen van gegevens",
|
72 |
+
"new_event": "Nieuw evenement",
|
73 |
+
"confirm_delete_event": "Bevestigt U het verwijderen van dit evenement?",
|
74 |
+
"confrim_delete_event_or_all": "Wilt U alle herhaalde evenementen verwijderen, of alleen maar dit evenement? \r\n Klik op [OK] om alleen dit evenement te verwijderen, klik op [Annuleren] om alle herhaalde evenementen te verwijderen.",
|
75 |
+
"data_format_error": "Fout met het formaat van de gegevens",
|
76 |
+
"invalid_title": "Titel van het evenement kan niet leeg zijn of ($<>) bevatten",
|
77 |
+
"view_no_ready": "Afbeelding is nog niet klaar",
|
78 |
+
"example": "Bijv. Bijeenkomst in zaal 107",
|
79 |
+
"content": "Wat",
|
80 |
+
"create_event": "Maak een evenement",
|
81 |
+
"update_detail": "Details wijzigen",
|
82 |
+
"click_to_detail": "Details bekijken",
|
83 |
+
"i_delete": "Verwijderen",
|
84 |
+
"i_save": "Opslaan",
|
85 |
+
"i_close": "Sluiten",
|
86 |
+
"day_plural": "Dagen",
|
87 |
+
"others": "Anderen",
|
88 |
+
"item": "",
|
89 |
+
"loading_data":"Gegevens worden geladen...",
|
90 |
+
"request_processed":"Het verzoek wordt verwerkt....",
|
91 |
+
"success":"Succes!",
|
92 |
+
"are_you_sure_delete":"Bent U zeker dat U dit evenement wilt verwijderen?",
|
93 |
+
"ok":"OK",
|
94 |
+
"cancel":"Annuleren",
|
95 |
+
"manage_the_calendar":"Agenda beheren",
|
96 |
+
"error_occurs":"Fout",
|
97 |
+
"color":"Kleur",
|
98 |
+
"invalid_date_format":"Ongeldige datumsformaat",
|
99 |
+
"invalid_time_format":"Ongeldige tijdsformaat",
|
100 |
+
"_simbol_not_allowed":"$<> niet toegestaan",
|
101 |
+
"subject":"Onderwerp",
|
102 |
+
"time":"Tijd",
|
103 |
+
"to":"tot",
|
104 |
+
"all_day_event":"Evenement van een hele dag",
|
105 |
+
"location":"Plaats",
|
106 |
+
"remark":"Beschrijving",
|
107 |
+
"click_to_create_new_event":"Klik hier om een nieuw evenement te maken",
|
108 |
+
"new_event":"Nieuw evenement",
|
109 |
+
"click_to_back_to_today":"Klik hier om terug te gaan naar vandaag",
|
110 |
+
"today":"Vandaag",
|
111 |
+
"sday":"Dag",
|
112 |
+
"week":"Week",
|
113 |
+
"month":"Maand",
|
114 |
+
"ndays":"Dag",
|
115 |
+
"list":"List",
|
116 |
+
"nmonth":"nMaand",
|
117 |
+
"refresh_view":"Uitzicht vernieuwen",
|
118 |
+
"refresh":"Verversen",
|
119 |
+
"prev":"Vorige",
|
120 |
+
"next":"Volg.",
|
121 |
+
"loading":"Uw gegevens worden geladen.",
|
122 |
+
"error_overlapping":"This event is overlapping another event",
|
123 |
+
"sorry_could_not_load_your_data":"Uw gegevens kunnen helaas niet geladen worden, probeer het later nog eens.",
|
124 |
+
"first":"First",
|
125 |
+
"second":"Second",
|
126 |
+
"third":"Third",
|
127 |
+
"fourth":"Fourth",
|
128 |
+
"last":"last",
|
129 |
+
"repeat":"Repeat: ",
|
130 |
+
"edit":"Edit",
|
131 |
+
"edit_recurring_event":"Edit recurring event",
|
132 |
+
"would_you_like_to_change_only_this_event_all_events_in_the_series_or_this_and_all_following_events_in_the_series":"Would you like to change only this event, all events in the series, or this and all following events in the series?",
|
133 |
+
"only_this_event":"Only this event",
|
134 |
+
"all_other_events_in_the_series_will_remain_the_same":"All other events in the series will remain the same.",
|
135 |
+
"following_events":"Following events",
|
136 |
+
"this_and_all_the_following_events_will_be_changed":"This and all the following events will be changed.",
|
137 |
+
"any_changes_to_future_events_will_be_lost":"Any changes to future events will be lost.",
|
138 |
+
"all_events":"All events",
|
139 |
+
"all_events_in_the_series_will_be_changed":"All events in the series will be changed.",
|
140 |
+
"any_changes_made_to_other_events_will_be_kept":"Any changes made to other events will be kept.",
|
141 |
+
"cancel_this_change":"Cancel this change",
|
142 |
+
"delete_recurring_event":"Delete recurring event",
|
143 |
+
"would_you_like_to_delete_only_this_event_all_events_in_the_series_or_this_and_all_future_events_in_the_series":"Would you like to delete only this event, all events in the series, or this and all future events in the series?",
|
144 |
+
"only_this_instance":"Only this instance",
|
145 |
+
"all_other_events_in_the_series_will_remain":"All other events in the series will remain.",
|
146 |
+
"all_following":"All following",
|
147 |
+
"this_and_all_the_following_events_will_be_deleted":"This and all the following events will be deleted.",
|
148 |
+
"all_events_in_the_series":"All events in the series",
|
149 |
+
"all_events_in_the_series_will_be_deleted":"All events in the series will be deleted.",
|
150 |
+
"repeats":"Repeats",
|
151 |
+
"daily":"Daily",
|
152 |
+
"every_weekday_monday_to_friday":"Every weekday (Monday to Friday)",
|
153 |
+
"every_monday_wednesday_and_friday":"Every Monday, Wednesday, and Friday",
|
154 |
+
"every_tuesday_and_thursday":"Every Tuesday, and Thursday",
|
155 |
+
"weekly":"Weekly",
|
156 |
+
"monthly":"Monthly",
|
157 |
+
"yearly":"Yearly",
|
158 |
+
"repeat_every":"Repeat every:",
|
159 |
+
"weeks":"weeks",
|
160 |
+
"repeat_on":"Repeat on:",
|
161 |
+
"repeat_by":"Repeat by:",
|
162 |
+
"day_of_the_month":"day of the month",
|
163 |
+
"day_of_the_week":"day of the week",
|
164 |
+
"starts_on":"Starts on:",
|
165 |
+
"ends":"Ends:",
|
166 |
+
"never":" Never",
|
167 |
+
"after":"After",
|
168 |
+
"occurrences":"occurrences",
|
169 |
+
"summary":"Summary:",
|
170 |
+
"every":"Every",
|
171 |
+
"weekly_on_weekdays":"Weekly on weekdays",
|
172 |
+
"weekly_on_monday_wednesday_friday":"Weekly on Monday, Wednesday, Friday",
|
173 |
+
"weekly_on_tuesday_thursday":"Weekly on Tuesday, Thursday",
|
174 |
+
"on":"on",
|
175 |
+
"on_day":"on day",
|
176 |
+
"on_the":"on the",
|
177 |
+
"months":"months",
|
178 |
+
"annually":"Annually",
|
179 |
+
"years":"years",
|
180 |
+
"once":"Once",
|
181 |
+
"times":"times",
|
182 |
+
"readmore":"read more",
|
183 |
+
"readmore_less":"less",
|
184 |
+
"readmore":"read more",
|
185 |
+
"readmore_less":"less",
|
186 |
+
"until":"until"
|
187 |
+
}
|
188 |
+
});
|
DC_MultiViewCal/language/multiview_lang_pl_PL.js
ADDED
@@ -0,0 +1,186 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
var i18n = jQuery.extend({}, i18n || {}, {
|
2 |
+
dcmvcal: {
|
3 |
+
dateformat: {
|
4 |
+
"fulldaykey": "MMddyyyy",
|
5 |
+
"fulldayshow": "L d yyyy",
|
6 |
+
"fulldayvalue": "M/d/yyyy",
|
7 |
+
"Md": "W M/d",
|
8 |
+
"nDaysView": "M/d",
|
9 |
+
"listViewDate": "d L yyyy",
|
10 |
+
"Md3": "L d",
|
11 |
+
"separator": "/",
|
12 |
+
"year_index": 2,
|
13 |
+
"month_index": 0,
|
14 |
+
"day_index": 1,
|
15 |
+
"day": "d",
|
16 |
+
"sun2": "nd",
|
17 |
+
"mon2": "pon",
|
18 |
+
"tue2": "wt",
|
19 |
+
"wed2": "śr",
|
20 |
+
"thu2": "czw",
|
21 |
+
"fri2": "pią",
|
22 |
+
"sat2": "sob",
|
23 |
+
"sun": "nd",
|
24 |
+
"mon": "pon",
|
25 |
+
"tue": "wt",
|
26 |
+
"wed": "śr",
|
27 |
+
"thu": "czw",
|
28 |
+
"fri": "pią",
|
29 |
+
"sat": "sob",
|
30 |
+
"sunday": "niedziela",
|
31 |
+
"monday": "poniedziałek",
|
32 |
+
"tuesday": "wtorek",
|
33 |
+
"wednesday": "środa",
|
34 |
+
"thursday": "czwartek",
|
35 |
+
"friday": "piątek",
|
36 |
+
"saturday": "sobota",
|
37 |
+
"jan": "sty",
|
38 |
+
"feb": "luty",
|
39 |
+
"mar": "marz",
|
40 |
+
"apr": "kwi",
|
41 |
+
"may": "maj",
|
42 |
+
"jun": "czer",
|
43 |
+
"jul": "lip",
|
44 |
+
"aug": "sier",
|
45 |
+
"sep": "wrz",
|
46 |
+
"oct": "paź",
|
47 |
+
"nov": "lis",
|
48 |
+
"dec": "gru",
|
49 |
+
"l_jan": "styczeń",
|
50 |
+
"l_feb": "luty",
|
51 |
+
"l_mar": "marzec",
|
52 |
+
"l_apr": "kwiecień",
|
53 |
+
"l_may": "maj",
|
54 |
+
"l_jun": "czerwiec",
|
55 |
+
"l_jul": "lipiec",
|
56 |
+
"l_aug": "sierpień",
|
57 |
+
"l_sep": "wrzesień",
|
58 |
+
"l_oct": "październik",
|
59 |
+
"l_nov": "listopad",
|
60 |
+
"l_dec": "grudzień"
|
61 |
+
},
|
62 |
+
"no_implemented": "funkcja jeszcze niezaimplementowana",
|
63 |
+
"to_date_view": "Kliknij, aby zobaczyć aktualną datę",
|
64 |
+
"i_undefined": "niezdefiniowany",
|
65 |
+
"allday_event": "całodzienne wydarzenie",
|
66 |
+
"repeat_event": "powtórz wydarzenie",
|
67 |
+
"time": "czas",
|
68 |
+
"event": "wydarzenie",
|
69 |
+
"location": "lokalizacja",
|
70 |
+
"participant": "uczestnik",
|
71 |
+
"get_data_exception": "błąd podczas pobierania danych",
|
72 |
+
"new_event": "nowe wydarzenie",
|
73 |
+
"confirm_delete_event": "Czy chcesz na pewno usunąć to wydarzenie",
|
74 |
+
"confrim_delete_event_or_all": "Czy chcesz usunąć wszystkie powtarzające się wydarzenie czy tylko aktualne? \r\nKliknij [OK] aby usunąć aktualne wydarznie, kliknij [anuluj] aby usunać wszystkie wydarzenia",
|
75 |
+
"data_format_error": "niepoprawny format daty! ",
|
76 |
+
"invalid_title": "Nazwa wydarzenia nie może być pusta lub zawierać ($<>)",
|
77 |
+
"view_no_ready": "widok jeszcze nie gotowy",
|
78 |
+
"example": "przykład: spotkanie w pokoju 107",
|
79 |
+
"content": "Co?",
|
80 |
+
"create_event": "Utwórz wydarzenie",
|
81 |
+
"update_detail": "Edytuj szczegóły",
|
82 |
+
"click_to_detail": "Zobacz szczegóły",
|
83 |
+
"i_delete": "Usuń",
|
84 |
+
"i_save": "Zapisz",
|
85 |
+
"i_close": "Zamknij",
|
86 |
+
"day_plural": "dni",
|
87 |
+
"others": "pozostałe",
|
88 |
+
"item": "pozycja",
|
89 |
+
"loading_data":"ładowanie danych...",
|
90 |
+
"request_processed":"zapytanie jest właśnie przetwarzane",
|
91 |
+
"success":"powodzenie!",
|
92 |
+
"are_you_sure_delete":"Czy chcesz usunąć to wydarzenie?",
|
93 |
+
"ok":"Ok",
|
94 |
+
"cancel":"anuluj",
|
95 |
+
"manage_the_calendar":"Zarządzaj kalendarzem",
|
96 |
+
"error_occurs":"Wystąpił błąd",
|
97 |
+
"color":"kolor",
|
98 |
+
"invalid_date_format":"niepoprawny format daty",
|
99 |
+
"invalid_time_format":"niepoprawny format czasu",
|
100 |
+
"_simbol_not_allowed":"$<> nie dozwolone",
|
101 |
+
"subject":"nazwa wydarzenie",
|
102 |
+
"time":"czas",
|
103 |
+
"to":"do",
|
104 |
+
"all_day_event":"wydarzenie całodzienne",
|
105 |
+
"location":"lokalizacja",
|
106 |
+
"remark":"opis",
|
107 |
+
"click_to_create_new_event":"Kliknij, aby utworzyć nowe wydarzenie.",
|
108 |
+
"new_event":"nowe wydarzenie",
|
109 |
+
"click_to_back_to_today":"Kliknij, aby powrócic do dnia dzisiejszego",
|
110 |
+
"today":"dzisiaj",
|
111 |
+
"sday":"dzień",
|
112 |
+
"week":"tydzień",
|
113 |
+
"month":"miesiąc",
|
114 |
+
"ndays":"dni",
|
115 |
+
"list":"List",
|
116 |
+
"nmonth":"dowolny miesiąc",
|
117 |
+
"refresh_view":"odśwież widok",
|
118 |
+
"refresh":"odswież",
|
119 |
+
"prev":"poprzednie",
|
120 |
+
"next":"następne",
|
121 |
+
"loading":"ładowanie",
|
122 |
+
"error_overlapping":"Wystąpują dwa wydarzenia w tym samym czasie!",
|
123 |
+
"sorry_could_not_load_your_data":"Nie mogę załadować danych, proszę spróbować ponownie!",
|
124 |
+
"first":"pierwszy",
|
125 |
+
"second":"drugi",
|
126 |
+
"third":"trzeci",
|
127 |
+
"fourth":"czwarty",
|
128 |
+
"last":"ostatni",
|
129 |
+
"repeat":"powtórz: ",
|
130 |
+
"edit":"edytuj",
|
131 |
+
"edit_recurring_event":"edytuj wydarzenia cykliczne",
|
132 |
+
"would_you_like_to_change_only_this_event_all_events_in_the_series_or_this_and_all_following_events_in_the_series":"Czy chciałbyś zmienić tylko to wydarzenie, wszystkie wydarzenia w serii, czy to i następne wydarzenia w serii?",
|
133 |
+
"only_this_event":"tylko to wydarzenie",
|
134 |
+
"all_other_events_in_the_series_will_remain_the_same":"Wszystkie wydarzenia w serii pozostaw bez zmian",
|
135 |
+
"following_events":"następne wydarzenia",
|
136 |
+
"this_and_all_the_following_events_will_be_changed":"To i nastęne wydarzenia zostały zmienione",
|
137 |
+
"any_changes_to_future_events_will_be_lost":"Wszelkie dokonane zmiany, zostaną utracone",
|
138 |
+
"all_events":"wszystkie wydarzenia",
|
139 |
+
"all_events_in_the_series_will_be_changed":"Wszystkie wydarzenia w serii zostaną zmienione",
|
140 |
+
"any_changes_made_to_other_events_will_be_kept":"Wszelkie modyfikacje w pozostałych wydarzeń nie ulegną zmianie",
|
141 |
+
"cancel_this_change":"Anuluj tą zmianę",
|
142 |
+
"delete_recurring_event":"Usuń powtarzające się wydarzenie",
|
143 |
+
"would_you_like_to_delete_only_this_event_all_events_in_the_series_or_this_and_all_future_events_in_the_series":"Czy chciałbyś zmienić tylko to wydarzenie, wszystkie wydarzenia w serii, czy to i następne wydarzenia w serii?",
|
144 |
+
"only_this_instance":"tylko to wystąpienie",
|
145 |
+
"all_other_events_in_the_series_will_remain":"Wszystkie pozostałe wydarzenia w serii zostaną zmienione",
|
146 |
+
"all_following":"wszystkie następne",
|
147 |
+
"this_and_all_the_following_events_will_be_deleted":"To i następne wydadarzenie zostaną usunięte",
|
148 |
+
"all_events_in_the_series":"wszystkie wydarzenia w serii",
|
149 |
+
"all_events_in_the_series_will_be_deleted":"Wszystkie wydarzenia w serii zostaną usunięte",
|
150 |
+
"repeats":"powtarzaj",
|
151 |
+
"daily":"dziennie",
|
152 |
+
"every_weekday_monday_to_friday":"każdy dzień powszedni (od poniedziałku do piątku)",
|
153 |
+
"every_monday_wednesday_and_friday":"każdy poniedziałek, środę oraz piątek",
|
154 |
+
"every_tuesday_and_thursday":"każdy wtorek oraz czwartek",
|
155 |
+
"weekly":"tygodniowo",
|
156 |
+
"monthly":"miesięcznie",
|
157 |
+
"yearly":"rocznie",
|
158 |
+
"repeat_every":"powtórz w każdy:",
|
159 |
+
"weeks":"tydzień",
|
160 |
+
"repeat_on":"powtórz tylko:",
|
161 |
+
"repeat_by":"powtórz przez:",
|
162 |
+
"day_of_the_month":"dzień miesiąca",
|
163 |
+
"day_of_the_week":"dzień tygodnia",
|
164 |
+
"starts_on":"rozpocznij:",
|
165 |
+
"ends":"zakończ:",
|
166 |
+
"never":"nigdy",
|
167 |
+
"after":"po",
|
168 |
+
"occurrences":"zdarzenie",
|
169 |
+
"summary":"podsumowanie:",
|
170 |
+
"every":"każdy",
|
171 |
+
"weekly_on_weekdays":"co tydzień w dni powszednie",
|
172 |
+
"weekly_on_monday_wednesday_friday":"tygodniowo w poniedziałki, środy i piątki",
|
173 |
+
"weekly_on_tuesday_thursday":"tygodniowo we wtorki i czwartki",
|
174 |
+
"on":"w",
|
175 |
+
"on_day":"na dzień",
|
176 |
+
"on_the":"ma",
|
177 |
+
"months":"miesiąc",
|
178 |
+
"annually":"rocznie",
|
179 |
+
"years":"rok",
|
180 |
+
"once":"jednorazowo",
|
181 |
+
"times":"czasowo",
|
182 |
+
"readmore":"Czytaj więcej",
|
183 |
+
"readmore_less":"mniej",
|
184 |
+
"until":"dopóki"
|
185 |
+
}
|
186 |
+
});
|
DC_MultiViewCal/language/multiview_lang_pt_BR.js
ADDED
@@ -0,0 +1,191 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
Translation created and provided by Joao Elton Moreto - http://www.q11.com.br
|
3 |
+
*/
|
4 |
+
var i18n = jQuery.extend({}, i18n || {}, {
|
5 |
+
dcmvcal: {
|
6 |
+
dateformat: {
|
7 |
+
"fulldaykey": "ddMMyyyy",
|
8 |
+
"fulldayshow": "d L yyyy",
|
9 |
+
"fulldayvalue": "d/M/yyyy",
|
10 |
+
"Md": "W d/M",
|
11 |
+
"nDaysView": "d/M",
|
12 |
+
"listViewDate": "d L yyyy",
|
13 |
+
"Md3": "d L",
|
14 |
+
"separator": "/",
|
15 |
+
"year_index": 2,
|
16 |
+
"month_index": 1,
|
17 |
+
"day_index": 0,
|
18 |
+
"day": "d",
|
19 |
+
"sun2": "D",
|
20 |
+
"mon2": "S",
|
21 |
+
"tue2": "T",
|
22 |
+
"wed2": "Q",
|
23 |
+
"thu2": "Q",
|
24 |
+
"fri2": "S",
|
25 |
+
"sat2": "S",
|
26 |
+
"sun": "Dom",
|
27 |
+
"mon": "Seg",
|
28 |
+
"tue": "Ter",
|
29 |
+
"wed": "Qua",
|
30 |
+
"thu": "Qui",
|
31 |
+
"fri": "Sex",
|
32 |
+
"sat": "Sáb",
|
33 |
+
"sunday": "Domingo",
|
34 |
+
"monday": "Segunda-feira",
|
35 |
+
"tuesday": "Terça-feira",
|
36 |
+
"wednesday": "Quarta-feira",
|
37 |
+
"thursday": "Quinta-feira",
|
38 |
+
"friday": "Sexta-feira",
|
39 |
+
"saturday": "Sábado",
|
40 |
+
"jan": "Jan",
|
41 |
+
"feb": "Fev",
|
42 |
+
"mar": "Mar",
|
43 |
+
"apr": "Abr",
|
44 |
+
"may": "Mai",
|
45 |
+
"jun": "Jun",
|
46 |
+
"jul": "Jul",
|
47 |
+
"aug": "Ago",
|
48 |
+
"sep": "Set",
|
49 |
+
"oct": "Out",
|
50 |
+
"nov": "Nov",
|
51 |
+
"dec": "Dez",
|
52 |
+
"l_jan": "Janeiro",
|
53 |
+
"l_feb": "Fevereiro",
|
54 |
+
"l_mar": "Março",
|
55 |
+
"l_apr": "Abril",
|
56 |
+
"l_may": "Maio",
|
57 |
+
"l_jun": "Junho",
|
58 |
+
"l_jul": "Julho",
|
59 |
+
"l_aug": "Agosto",
|
60 |
+
"l_sep": "Setembro",
|
61 |
+
"l_oct": "Outubro",
|
62 |
+
"l_nov": "Novembro",
|
63 |
+
"l_dec": "Dezembro"
|
64 |
+
},
|
65 |
+
"no_implemented": "Ainda não implementado",
|
66 |
+
"to_date_view": "Clique aqui para ver a data de hoje",
|
67 |
+
"i_undefined": "Indefinido",
|
68 |
+
"allday_event": "Evento de dia enteiro",
|
69 |
+
"repeat_event": "Repetir evento",
|
70 |
+
"time": "Hora",
|
71 |
+
"event": "Evento",
|
72 |
+
"location": "Lugar",
|
73 |
+
"participant": "Participante",
|
74 |
+
"get_data_exception": "Erro ao obter datos",
|
75 |
+
"new_event": "Novo evento",
|
76 |
+
"confirm_delete_event": "Confirma a exclusão deste evento?",
|
77 |
+
"confrim_delete_event_or_all": "Deseja eliminar todos os eventos repetidos ou somente este evento? \r\n Clique [OK] para eliminar somente este evento, clique [Cancelar] para eliminar todos os eventos repetidos.",
|
78 |
+
"data_format_error": "Erro com o formato dos datos",
|
79 |
+
"invalid_title": "Título do evento não pode estar em branco ou conter ($<>) ",
|
80 |
+
"view_no_ready": "A imagem não está pronta",
|
81 |
+
"example": "Por exemplo, reunião na sala 107",
|
82 |
+
"content": "O que",
|
83 |
+
"create_event": "Criar evento",
|
84 |
+
"update_detail": "Modificar detalhes",
|
85 |
+
"click_to_detail": "Veja mais detalhes",
|
86 |
+
"i_delete": "Excluir",
|
87 |
+
"i_save": "Salvar",
|
88 |
+
"i_close": "Fechar",
|
89 |
+
"day_plural": "Dias",
|
90 |
+
"others": "Outros",
|
91 |
+
"item": "Item",
|
92 |
+
"loading_data":"Carregando dados...",
|
93 |
+
"request_processed":"A sua solicitação está sendo processada...",
|
94 |
+
"success":"Sucesso",
|
95 |
+
"are_you_sure_delete":"Tem certeza que deseja excluir este evento?",
|
96 |
+
"ok":"OK",
|
97 |
+
"cancel":"Cancelar",
|
98 |
+
"manage_the_calendar":"Gerir o calendário",
|
99 |
+
"error_occurs":"Erro",
|
100 |
+
"color":"Cor",
|
101 |
+
"invalid_date_format":"Formato da data inválido",
|
102 |
+
"invalid_time_format":"Formato da hora inválido",
|
103 |
+
"_simbol_not_allowed":"$<> Não permitido",
|
104 |
+
"subject":"Assunto",
|
105 |
+
"time":"Hora",
|
106 |
+
"to":"A",
|
107 |
+
"all_day_event":"Evento de dia inteiro",
|
108 |
+
"location":"Lugar",
|
109 |
+
"remark":"Descrição",
|
110 |
+
"click_to_create_new_event":"Clique para criar um novo evento",
|
111 |
+
"new_event":"Novo evento",
|
112 |
+
"click_to_back_to_today":"Clique para voltar ao dia de hoje",
|
113 |
+
"today":"Hoje",
|
114 |
+
"sday":"Dia",
|
115 |
+
"week":"Semana",
|
116 |
+
"month":"Mês",
|
117 |
+
"ndays":"Dia",
|
118 |
+
"list":"List",
|
119 |
+
"nmonth":"nMês",
|
120 |
+
"refresh_view":"Atualizar visão",
|
121 |
+
"refresh":"Atualizar",
|
122 |
+
"prev":"Anterior",
|
123 |
+
"next":"Próximo",
|
124 |
+
"loading":"Seus dados estão sendo transferidos",
|
125 |
+
"error_overlapping":"Este evento está se sobrepondo a outro",
|
126 |
+
"sorry_could_not_load_your_data":"Desculpe, não foi possível carregar os seus dados. Por favor, tente novamente mais tarde.",
|
127 |
+
"first":"Primeiro",
|
128 |
+
"second":"Segundo",
|
129 |
+
"third":"Terceiro",
|
130 |
+
"fourth":"Quarto",
|
131 |
+
"last":"último",
|
132 |
+
"repeat":"Repetir: ",
|
133 |
+
"edit":"Editar",
|
134 |
+
"edit_recurring_event":"Editar evento recorrente",
|
135 |
+
"would_you_like_to_change_only_this_event_all_events_in_the_series_or_this_and_all_following_events_in_the_series":"Você deseja editar apenas este evento, todos os eventos nesta série ou este evento e os seguintes nesta série?",
|
136 |
+
"only_this_event":"Apenas este evento",
|
137 |
+
"all_other_events_in_the_series_will_remain_the_same":"Todos os outros eventos na série permanecerão os mesmos.",
|
138 |
+
"following_events":"Eventos seguintes",
|
139 |
+
"this_and_all_the_following_events_will_be_changed":"Este e todos os eventos em seguida serão alterados.",
|
140 |
+
"any_changes_to_future_events_will_be_lost":"Todas as alterações em futuros eventos serão perdidas.",
|
141 |
+
"all_events":"Todos os eventos",
|
142 |
+
"all_events_in_the_series_will_be_changed":"Todos os eventos neste série serão alterados.",
|
143 |
+
"any_changes_made_to_other_events_will_be_kept":"Todas as mudanças feitas a outros eventos serão mantidas.",
|
144 |
+
"cancel_this_change":"Cancelar esta alteração",
|
145 |
+
"delete_recurring_event":"Excluir evento recorrente",
|
146 |
+
"would_you_like_to_delete_only_this_event_all_events_in_the_series_or_this_and_all_future_events_in_the_series":"Você deseja excluir apenas este evento, todos os eventos nesta série ou este evento e os seguintes nesta série?",
|
147 |
+
"only_this_instance":"Apenas esta instância",
|
148 |
+
"all_other_events_in_the_series_will_remain":"Todos os demais eventos nesta série serão mantidos.",
|
149 |
+
"all_following":"Todos os seguintes",
|
150 |
+
"this_and_all_the_following_events_will_be_deleted":"Este e todos os eventos seguintes serão excluídos.",
|
151 |
+
"all_events_in_the_series":"Todos os eventos na série.",
|
152 |
+
"all_events_in_the_series_will_be_deleted":"Todos os eventos na série serão excluídos.",
|
153 |
+
"repeats":"Repetidos",
|
154 |
+
"daily":"Diário",
|
155 |
+
"every_weekday_monday_to_friday":"A semana toda (segunda a sexta-feira)",
|
156 |
+
"every_monday_wednesday_and_friday":"Toda segunda, quarta e sexta-feira",
|
157 |
+
"every_tuesday_and_thursday":"Toda terça e quinta-feira",
|
158 |
+
"weekly":"Semanal",
|
159 |
+
"monthly":"Mensal",
|
160 |
+
"yearly":"Anual",
|
161 |
+
"repeat_every":"Repetir a cada:",
|
162 |
+
"weeks":"semanas",
|
163 |
+
"repeat_on":"Repetir em:",
|
164 |
+
"repeat_by":"Repetir por:",
|
165 |
+
"day_of_the_month":"dia do mês",
|
166 |
+
"day_of_the_week":"dia da semana",
|
167 |
+
"starts_on":"Começa em:",
|
168 |
+
"ends":"Termina:",
|
169 |
+
"never":" Nunca",
|
170 |
+
"after":"Após",
|
171 |
+
"occurrences":"ocorrências",
|
172 |
+
"summary":"Sumário:",
|
173 |
+
"every":"Cada",
|
174 |
+
"weekly_on_weekdays":"Semanal em dias da semana",
|
175 |
+
"weekly_on_monday_wednesday_friday":"Semanal `s segundas, quartas e sextas-feiras",
|
176 |
+
"weekly_on_tuesday_thursday":"Semanal `s terças e quintas-feira",
|
177 |
+
"on":"em",
|
178 |
+
"on_day":"no dia",
|
179 |
+
"on_the":"no",
|
180 |
+
"months":"meses",
|
181 |
+
"annually":"Anualmente",
|
182 |
+
"years":"anos",
|
183 |
+
"once":"Uma vez",
|
184 |
+
"times":"vezes",
|
185 |
+
"readmore":"read more",
|
186 |
+
"readmore_less":"less",
|
187 |
+
"readmore":"read more",
|
188 |
+
"readmore_less":"less",
|
189 |
+
"until":"até"
|
190 |
+
}
|
191 |
+
});
|
DC_MultiViewCal/language/multiview_lang_pt_PT.js
ADDED
@@ -0,0 +1,191 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
Translation created and provided by Joao Elton Moreto - http://www.q11.com.br
|
3 |
+
*/
|
4 |
+
var i18n = jQuery.extend({}, i18n || {}, {
|
5 |
+
dcmvcal: {
|
6 |
+
dateformat: {
|
7 |
+
"fulldaykey": "ddMMyyyy",
|
8 |
+
"fulldayshow": "d L yyyy",
|
9 |
+
"fulldayvalue": "d/M/yyyy",
|
10 |
+
"Md": "W d/M",
|
11 |
+
"nDaysView": "d/M",
|
12 |
+
"listViewDate": "d L yyyy",
|
13 |
+
"Md3": "d L",
|
14 |
+
"separator": "/",
|
15 |
+
"year_index": 2,
|
16 |
+
"month_index": 1,
|
17 |
+
"day_index": 0,
|
18 |
+
"day": "d",
|
19 |
+
"sun2": "D",
|
20 |
+
"mon2": "S",
|
21 |
+
"tue2": "T",
|
22 |
+
"wed2": "Q",
|
23 |
+
"thu2": "Q",
|
24 |
+
"fri2": "S",
|
25 |
+
"sat2": "S",
|
26 |
+
"sun": "Dom",
|
27 |
+
"mon": "Seg",
|
28 |
+
"tue": "Ter",
|
29 |
+
"wed": "Qua",
|
30 |
+
"thu": "Qui",
|
31 |
+
"fri": "Sex",
|
32 |
+
"sat": "Sáb",
|
33 |
+
"sunday": "Domingo",
|
34 |
+
"monday": "Segunda-feira",
|
35 |
+
"tuesday": "Terça-feira",
|
36 |
+
"wednesday": "Quarta-feira",
|
37 |
+
"thursday": "Quinta-feira",
|
38 |
+
"friday": "Sexta-feira",
|
39 |
+
"saturday": "Sábado",
|
40 |
+
"jan": "Jan",
|
41 |
+
"feb": "Fev",
|
42 |
+
"mar": "Mar",
|
43 |
+
"apr": "Abr",
|
44 |
+
"may": "Mai",
|
45 |
+
"jun": "Jun",
|
46 |
+
"jul": "Jul",
|
47 |
+
"aug": "Ago",
|
48 |
+
"sep": "Set",
|
49 |
+
"oct": "Out",
|
50 |
+
"nov": "Nov",
|
51 |
+
"dec": "Dez",
|
52 |
+
"l_jan": "Janeiro",
|
53 |
+
"l_feb": "Fevereiro",
|
54 |
+
"l_mar": "Março",
|
55 |
+
"l_apr": "Abril",
|
56 |
+
"l_may": "Maio",
|
57 |
+
"l_jun": "Junho",
|
58 |
+
"l_jul": "Julho",
|
59 |
+
"l_aug": "Agosto",
|
60 |
+
"l_sep": "Setembro",
|
61 |
+
"l_oct": "Outubro",
|
62 |
+
"l_nov": "Novembro",
|
63 |
+
"l_dec": "Dezembro"
|
64 |
+
},
|
65 |
+
"no_implemented": "Ainda não implementado",
|
66 |
+
"to_date_view": "Clique aqui para ver a data de hoje",
|
67 |
+
"i_undefined": "Indefinido",
|
68 |
+
"allday_event": "Evento de dia enteiro",
|
69 |
+
"repeat_event": "Repetir evento",
|
70 |
+
"time": "Hora",
|
71 |
+
"event": "Evento",
|
72 |
+
"location": "Lugar",
|
73 |
+
"participant": "Participante",
|
74 |
+
"get_data_exception": "Erro ao obter datos",
|
75 |
+
"new_event": "Novo evento",
|
76 |
+
"confirm_delete_event": "Confirma a exclusão deste evento?",
|
77 |
+
"confrim_delete_event_or_all": "Deseja eliminar todos os eventos repetidos ou somente este evento? \r\n Clique [OK] para eliminar somente este evento, clique [Cancelar] para eliminar todos os eventos repetidos.",
|
78 |
+
"data_format_error": "Erro com o formato dos datos",
|
79 |
+
"invalid_title": "Título do evento não pode estar em branco ou conter ($<>) ",
|
80 |
+
"view_no_ready": "A imagem não está pronta",
|
81 |
+
"example": "Por exemplo, reunião na sala 107",
|
82 |
+
"content": "O que",
|
83 |
+
"create_event": "Criar evento",
|
84 |
+
"update_detail": "Modificar detalhes",
|
85 |
+
"click_to_detail": "Veja mais detalhes",
|
86 |
+
"i_delete": "Excluir",
|
87 |
+
"i_save": "Salvar",
|
88 |
+
"i_close": "Fechar",
|
89 |
+
"day_plural": "Dias",
|
90 |
+
"others": "Outros",
|
91 |
+
"item": "Item",
|
92 |
+
"loading_data":"Carregando dados...",
|
93 |
+
"request_processed":"A sua solicitação está sendo processada...",
|
94 |
+
"success":"Sucesso",
|
95 |
+
"are_you_sure_delete":"Tem certeza que deseja excluir este evento?",
|
96 |
+
"ok":"OK",
|
97 |
+
"cancel":"Cancelar",
|
98 |
+
"manage_the_calendar":"Gerir o calendário",
|
99 |
+
"error_occurs":"Erro",
|
100 |
+
"color":"Cor",
|
101 |
+
"invalid_date_format":"Formato da data inválido",
|
102 |
+
"invalid_time_format":"Formato da hora inválido",
|
103 |
+
"_simbol_not_allowed":"$<> Não permitido",
|
104 |
+
"subject":"Assunto",
|
105 |
+
"time":"Hora",
|
106 |
+
"to":"A",
|
107 |
+
"all_day_event":"Evento de dia inteiro",
|
108 |
+
"location":"Lugar",
|
109 |
+
"remark":"Descrição",
|
110 |
+
"click_to_create_new_event":"Clique para criar um novo evento",
|
111 |
+
"new_event":"Novo evento",
|
112 |
+
"click_to_back_to_today":"Clique para voltar ao dia de hoje",
|
113 |
+
"today":"Hoje",
|
114 |
+
"sday":"Dia",
|
115 |
+
"week":"Semana",
|
116 |
+
"month":"Mês",
|
117 |
+
"ndays":"Dia",
|
118 |
+
"list":"List",
|
119 |
+
"nmonth":"nMês",
|
120 |
+
"refresh_view":"Atualizar visão",
|
121 |
+
"refresh":"Atualizar",
|
122 |
+
"prev":"Anterior",
|
123 |
+
"next":"Próximo",
|
124 |
+
"loading":"Seus dados estão sendo transferidos",
|
125 |
+
"error_overlapping":"Este evento está se sobrepondo a outro",
|
126 |
+
"sorry_could_not_load_your_data":"Desculpe, não foi possível carregar os seus dados. Por favor, tente novamente mais tarde.",
|
127 |
+
"first":"Primeiro",
|
128 |
+
"second":"Segundo",
|
129 |
+
"third":"Terceiro",
|
130 |
+
"fourth":"Quarto",
|
131 |
+
"last":"último",
|
132 |
+
"repeat":"Repetir: ",
|
133 |
+
"edit":"Editar",
|
134 |
+
"edit_recurring_event":"Editar evento recorrente",
|
135 |
+
"would_you_like_to_change_only_this_event_all_events_in_the_series_or_this_and_all_following_events_in_the_series":"Você deseja editar apenas este evento, todos os eventos nesta série ou este evento e os seguintes nesta série?",
|
136 |
+
"only_this_event":"Apenas este evento",
|
137 |
+
"all_other_events_in_the_series_will_remain_the_same":"Todos os outros eventos na série permanecerão os mesmos.",
|
138 |
+
"following_events":"Eventos seguintes",
|
139 |
+
"this_and_all_the_following_events_will_be_changed":"Este e todos os eventos em seguida serão alterados.",
|
140 |
+
"any_changes_to_future_events_will_be_lost":"Todas as alterações em futuros eventos serão perdidas.",
|
141 |
+
"all_events":"Todos os eventos",
|
142 |
+
"all_events_in_the_series_will_be_changed":"Todos os eventos neste série serão alterados.",
|
143 |
+
"any_changes_made_to_other_events_will_be_kept":"Todas as mudanças feitas a outros eventos serão mantidas.",
|
144 |
+
"cancel_this_change":"Cancelar esta alteração",
|
145 |
+
"delete_recurring_event":"Excluir evento recorrente",
|
146 |
+
"would_you_like_to_delete_only_this_event_all_events_in_the_series_or_this_and_all_future_events_in_the_series":"Você deseja excluir apenas este evento, todos os eventos nesta série ou este evento e os seguintes nesta série?",
|
147 |
+
"only_this_instance":"Apenas esta instância",
|
148 |
+
"all_other_events_in_the_series_will_remain":"Todos os demais eventos nesta série serão mantidos.",
|
149 |
+
"all_following":"Todos os seguintes",
|
150 |
+
"this_and_all_the_following_events_will_be_deleted":"Este e todos os eventos seguintes serão excluídos.",
|
151 |
+
"all_events_in_the_series":"Todos os eventos na série.",
|
152 |
+
"all_events_in_the_series_will_be_deleted":"Todos os eventos na série serão excluídos.",
|
153 |
+
"repeats":"Repetidos",
|
154 |
+
"daily":"Diário",
|
155 |
+
"every_weekday_monday_to_friday":"A semana toda (segunda a sexta-feira)",
|
156 |
+
"every_monday_wednesday_and_friday":"Toda segunda, quarta e sexta-feira",
|
157 |
+
"every_tuesday_and_thursday":"Toda terça e quinta-feira",
|
158 |
+
"weekly":"Semanal",
|
159 |
+
"monthly":"Mensal",
|
160 |
+
"yearly":"Anual",
|
161 |
+
"repeat_every":"Repetir a cada:",
|
162 |
+
"weeks":"semanas",
|
163 |
+
"repeat_on":"Repetir em:",
|
164 |
+
"repeat_by":"Repetir por:",
|
165 |
+
"day_of_the_month":"dia do mês",
|
166 |
+
"day_of_the_week":"dia da semana",
|
167 |
+
"starts_on":"Começa em:",
|
168 |
+
"ends":"Termina:",
|
169 |
+
"never":" Nunca",
|
170 |
+
"after":"Após",
|
171 |
+
"occurrences":"ocorrências",
|
172 |
+
"summary":"Sumário:",
|
173 |
+
"every":"Cada",
|
174 |
+
"weekly_on_weekdays":"Semanal em dias da semana",
|
175 |
+
"weekly_on_monday_wednesday_friday":"Semanal `s segundas, quartas e sextas-feiras",
|
176 |
+
"weekly_on_tuesday_thursday":"Semanal `s terças e quintas-feira",
|
177 |
+
"on":"em",
|
178 |
+
"on_day":"no dia",
|
179 |
+
"on_the":"no",
|
180 |
+
"months":"meses",
|
181 |
+
"annually":"Anualmente",
|
182 |
+
"years":"anos",
|
183 |
+
"once":"Uma vez",
|
184 |
+
"times":"vezes",
|
185 |
+
"readmore":"read more",
|
186 |
+
"readmore_less":"less",
|
187 |
+
"readmore":"read more",
|
188 |
+
"readmore_less":"less",
|
189 |
+
"until":"até"
|
190 |
+
}
|
191 |
+
});
|
DC_MultiViewCal/language/multiview_lang_ru_RU.js
ADDED
@@ -0,0 +1,186 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
var i18n = jQuery.extend({}, i18n || {}, {
|
2 |
+
dcmvcal: {
|
3 |
+
dateformat: {
|
4 |
+
"fulldaykey": "MMddyyyy",
|
5 |
+
"fulldayshow": "d L yyyy",
|
6 |
+
"fulldayvalue": "d/M/yyyy",
|
7 |
+
"Md": "W d/M",
|
8 |
+
"nDaysView": "d/M",
|
9 |
+
"listViewDate": "d L yyyy",
|
10 |
+
"Md3": "d L",
|
11 |
+
"separator": "/",
|
12 |
+
"year_index": 2,
|
13 |
+
"month_index": 0,
|
14 |
+
"day_index": 1,
|
15 |
+
"day": "d",
|
16 |
+
"sun2": "Вс",
|
17 |
+
"mon2": "Пн",
|
18 |
+
"tue2": "Вт",
|
19 |
+
"wed2": "Ср",
|
20 |
+
"thu2": "Чт",
|
21 |
+
"fri2": "Пн",
|
22 |
+
"sat2": "Сб",
|
23 |
+
"sun": "Вск",
|
24 |
+
"mon": "Пнд",
|
25 |
+
"tue": "Втр",
|
26 |
+
"wed": "Срд",
|
27 |
+
"thu": "Чтв",
|
28 |
+
"fri": "Птн",
|
29 |
+
"sat": "Сбт",
|
30 |
+
"sunday": "Воскресенье",
|
31 |
+
"monday": "Понедельник",
|
32 |
+
"tuesday": "Вторник",
|
33 |
+
"wednesday": "Среда",
|
34 |
+
"thursday": "Четверг",
|
35 |
+
"friday": "Пятница",
|
36 |
+
"saturday": "Суббота",
|
37 |
+
"jan": "Янв",
|
38 |
+
"feb": "Фев",
|
39 |
+
"mar": "Мрт",
|
40 |
+
"apr": "Апр",
|
41 |
+
"may": "Май",
|
42 |
+
"jun": "Июн",
|
43 |
+
"jul": "Июл",
|
44 |
+
"aug": "Авг",
|
45 |
+
"sep": "Сен",
|
46 |
+
"oct": "Окт",
|
47 |
+
"nov": "Нбр",
|
48 |
+
"dec": "Дек",
|
49 |
+
"l_jan": "Январь",
|
50 |
+
"l_feb": "Февраль",
|
51 |
+
"l_mar": "Март",
|
52 |
+
"l_apr": "Апрель",
|
53 |
+
"l_may": "Май",
|
54 |
+
"l_jun": "Июнь",
|
55 |
+
"l_jul": "Июль",
|
56 |
+
"l_aug": "Август",
|
57 |
+
"l_sep": "Сентябрь",
|
58 |
+
"l_oct": "Октябрь",
|
59 |
+
"l_nov": "Ноябрь",
|
60 |
+
"l_dec": "Декабрь"
|
61 |
+
},
|
62 |
+
"no_implemented": "Не реализовано",
|
63 |
+
"to_date_view": "Нажмите, чтобы увидеть дату",
|
64 |
+
"i_undefined": "Не определено",
|
65 |
+
"allday_event": "Целый день",
|
66 |
+
"repeat_event": "Повторить событие",
|
67 |
+
"time": "Время",
|
68 |
+
"event": "Событие",
|
69 |
+
"location": "Местонахождение",
|
70 |
+
"participant": "Участник",
|
71 |
+
"get_data_exception": "Исключение при получении данных",
|
72 |
+
"new_event": "Новое событие",
|
73 |
+
"confirm_delete_event": "Удалить событие ?",
|
74 |
+
"confrim_delete_event_or_all": "Do you want to delete all repeat events or only this event? \r\nClick [OK] to delete only this event, click [Cancel] delete all events",
|
75 |
+
"data_format_error": "Неверный формат даты",
|
76 |
+
"invalid_title": "Укажите название события ($<>)",
|
77 |
+
"view_no_ready": "View is not ready",
|
78 |
+
"example": "например: встреча в кафе в 18:00",
|
79 |
+
"content": "Тема",
|
80 |
+
"create_event": "Создать событие",
|
81 |
+
"update_detail": "Редактировать",
|
82 |
+
"click_to_detail": "Подробнее",
|
83 |
+
"i_delete": "Удалить",
|
84 |
+
"i_save": "Сохранить",
|
85 |
+
"i_close": "Закрыть",
|
86 |
+
"day_plural": "дни",
|
87 |
+
"others": "Другие",
|
88 |
+
"item": "",
|
89 |
+
"loading_data":"Загрузка данных...",
|
90 |
+
"request_processed":"Запрос обрабатывается...",
|
91 |
+
"success":"Выполнено",
|
92 |
+
"are_you_sure_delete":"Удалить это событие ?",
|
93 |
+
"ok":"Ok",
|
94 |
+
"cancel":"Отмена",
|
95 |
+
"manage_the_calendar":"Управление календарём",
|
96 |
+
"error_occurs":"Произошла ошибка",
|
97 |
+
"color":"Цвет",
|
98 |
+
"invalid_date_format":"Неверный формат даты",
|
99 |
+
"invalid_time_format":"Неверный формат времени",
|
100 |
+
"_simbol_not_allowed":"$<> не допускаются",
|
101 |
+
"subject":"Объект",
|
102 |
+
"time":"Дата",
|
103 |
+
"to":"Для",
|
104 |
+
"all_day_event":"Целый день",
|
105 |
+
"location":"Местонахождение",
|
106 |
+
"remark":"Описание",
|
107 |
+
"click_to_create_new_event":"Нажмите, чтобы создать событие",
|
108 |
+
"new_event":"Новое событие",
|
109 |
+
"click_to_back_to_today":"Нажмите, чтобы вернуться назад",
|
110 |
+
"today":"Сегодня",
|
111 |
+
"sday":"День",
|
112 |
+
"week":"Неделя",
|
113 |
+
"month":"Месяц",
|
114 |
+
"ndays":"Дней",
|
115 |
+
"list":"List",
|
116 |
+
"nmonth":"Год",
|
117 |
+
"refresh_view":"Обновить",
|
118 |
+
"refresh":"Обновить",
|
119 |
+
"prev":"Пред",
|
120 |
+
"next":"След",
|
121 |
+
"loading":"Загрузка",
|
122 |
+
"error_overlapping":"Это событие накладывается на другое",
|
123 |
+
"sorry_could_not_load_your_data":"К сожалению, не удалось загрузить ваши данные, повторите попытку позже",
|
124 |
+
"first":"Первый",
|
125 |
+
"second":"Второй",
|
126 |
+
"third":"Третий",
|
127 |
+
"fourth":"Четвёртый",
|
128 |
+
"last":"последний",
|
129 |
+
"repeat":"Повтор: ",
|
130 |
+
"edit":"Редактировать",
|
131 |
+
"edit_recurring_event":"Редактировать повтор события",
|
132 |
+
"would_you_like_to_change_only_this_event_all_events_in_the_series_or_this_and_all_following_events_in_the_series":"Хотели бы Вы изменить только это событие, все события в серии, или это и все последующие события в серии?",
|
133 |
+
"only_this_event":"Только это событие",
|
134 |
+
"all_other_events_in_the_series_will_remain_the_same":"Все остальные события в серии останутся прежними.",
|
135 |
+
"following_events":"Следующие события",
|
136 |
+
"this_and_all_the_following_events_will_be_changed":"Это и все последующие события будут изменены.",
|
137 |
+
"any_changes_to_future_events_will_be_lost":"Все изменения в наступающих событиях будут потеряны.",
|
138 |
+
"all_events":"Все события",
|
139 |
+
"all_events_in_the_series_will_be_changed":"Все события в этой серии будут изменены.",
|
140 |
+
"any_changes_made_to_other_events_will_be_kept":"Все изменения в других событиях, будут сохранены.",
|
141 |
+
"cancel_this_change":"Отменить это изменение",
|
142 |
+
"delete_recurring_event":"Удалить повторяющееся событие",
|
143 |
+
"would_you_like_to_delete_only_this_event_all_events_in_the_series_or_this_and_all_future_events_in_the_series":"Хотели бы Вы, чтобы удалить только это событие, все события в серии, или это и все последующие события в серии?",
|
144 |
+
"only_this_instance":"Только в этом случае",
|
145 |
+
"all_other_events_in_the_series_will_remain":"Все остальные события в серии останутся",
|
146 |
+
"all_following":"Все последующие",
|
147 |
+
"this_and_all_the_following_events_will_be_deleted":"Это и все последующие события будут удалены.",
|
148 |
+
"all_events_in_the_series":"Все события в серии",
|
149 |
+
"all_events_in_the_series_will_be_deleted":"Все события в серии будут удалены.",
|
150 |
+
"repeats":"Повторы",
|
151 |
+
"daily":"Ежедневно",
|
152 |
+
"every_weekday_monday_to_friday":"Каждый будний день (с понедельника по пятницу)",
|
153 |
+
"every_monday_wednesday_and_friday":"Каждый понедельник, среду и пятницу",
|
154 |
+
"every_tuesday_and_thursday":"Каждый вторник и четверг",
|
155 |
+
"weekly":"Еженедельно",
|
156 |
+
"monthly":"Ежемесячно",
|
157 |
+
"yearly":"Ежегодно",
|
158 |
+
"repeat_every":"Повтор каждый:",
|
159 |
+
"weeks":"недели",
|
160 |
+
"repeat_on":"Повторить с:",
|
161 |
+
"repeat_by":"Повторить по:",
|
162 |
+
"day_of_the_month":"день месяца",
|
163 |
+
"day_of_the_week":"день недели",
|
164 |
+
"starts_on":"Начинать с:",
|
165 |
+
"ends":"Заканчивать:",
|
166 |
+
"never":" Никогда",
|
167 |
+
"after":"После",
|
168 |
+
"occurrences":"входы",
|
169 |
+
"summary":"Резюме:",
|
170 |
+
"every":"Каждый",
|
171 |
+
"weekly_on_weekdays":"Еженедельно по будням",
|
172 |
+
"weekly_on_monday_wednesday_friday":"Еженедельно по понедельникам, средам, пятница",
|
173 |
+
"weekly_on_tuesday_thursday":"Еженедельно по вторникам, четвергам",
|
174 |
+
"on":"в",
|
175 |
+
"on_day":"в день",
|
176 |
+
"on_the":"на",
|
177 |
+
"months":"месяцев",
|
178 |
+
"annually":"ежегодно",
|
179 |
+
"years":"лет",
|
180 |
+
"once":"один раз",
|
181 |
+
"times":"раз",
|
182 |
+
"readmore":"read more",
|
183 |
+
"readmore_less":"less",
|
184 |
+
"until":"до"
|
185 |
+
}
|
186 |
+
});
|
DC_MultiViewCal/language/multiview_lang_sk_SK.js
ADDED
@@ -0,0 +1,186 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
var i18n = jQuery.extend({}, i18n || {}, {
|
2 |
+
dcmvcal: {
|
3 |
+
dateformat: {
|
4 |
+
"fulldaykey": "ddMMyyyy",
|
5 |
+
"fulldayshow": "d L yyyy",
|
6 |
+
"fulldayvalue": "d/M/yyyy",
|
7 |
+
"Md": "W d/M",
|
8 |
+
"nDaysView": "d/M",
|
9 |
+
"listViewDate": "d L yyyy",
|
10 |
+
"Md3": "d L",
|
11 |
+
"separator": "/",
|
12 |
+
"year_index": 2,
|
13 |
+
"month_index": 1,
|
14 |
+
"day_index": 0,
|
15 |
+
"day": "d",
|
16 |
+
"sun2": "Ne",
|
17 |
+
"mon2": "Po",
|
18 |
+
"tue2": "Ut",
|
19 |
+
"wed2": "St",
|
20 |
+
"thu2": "Št",
|
21 |
+
"fri2": "Pi",
|
22 |
+
"sat2": "So",
|
23 |
+
"sun": "Ned",
|
24 |
+
"mon": "Pon",
|
25 |
+
"tue": "Uto",
|
26 |
+
"wed": "Str",
|
27 |
+
"thu": "Štv",
|
28 |
+
"fri": "Pia",
|
29 |
+
"sat": "Sob",
|
30 |
+
"sunday": "Nedeľa",
|
31 |
+
"monday": "Pondelok",
|
32 |
+
"tuesday": "Utorok",
|
33 |
+
"wednesday": "Streda",
|
34 |
+
"thursday": "Štvrtok",
|
35 |
+
"friday": "Piatok",
|
36 |
+
"saturday": "Sobota",
|
37 |
+
"jan": "Jan",
|
38 |
+
"feb": "Feb",
|
39 |
+
"mar": "Mar",
|
40 |
+
"apr": "Apr",
|
41 |
+
"may": "Máj",
|
42 |
+
"jun": "Jún",
|
43 |
+
"jul": "Júl",
|
44 |
+
"aug": "Aug",
|
45 |
+
"sep": "Sep",
|
46 |
+
"oct": "Okt",
|
47 |
+
"nov": "Nov",
|
48 |
+
"dec": "dec",
|
49 |
+
"l_jan": "Janár",
|
50 |
+
"l_feb": "Február",
|
51 |
+
"l_mar": "Marec",
|
52 |
+
"l_apr": "Apríl",
|
53 |
+
"l_may": "Máj",
|
54 |
+
"l_jun": "Jún",
|
55 |
+
"l_jul": "Júl",
|
56 |
+
"l_aug": "August",
|
57 |
+
"l_sep": "September",
|
58 |
+
"l_oct": "Október",
|
59 |
+
"l_nov": "November",
|
60 |
+
"l_dec": "December"
|
61 |
+
},
|
62 |
+
"no_implemented": "Nevykonané",
|
63 |
+
"to_date_view": "Kliknite pre zobrazenie aktuálneho dátumu",
|
64 |
+
"i_undefined": "Nedefinované",
|
65 |
+
"allday_event": "Na celé dni",
|
66 |
+
"repeat_event": "Zopakovať",
|
67 |
+
"time": "Čas",
|
68 |
+
"event": "Rezervácia",
|
69 |
+
"location": "Miesto",
|
70 |
+
"participant": "Spoluúčastník",
|
71 |
+
"get_data_exception": "Výnimka pre data",
|
72 |
+
"new_event": "Nová rezervácia",
|
73 |
+
"confirm_delete_event": "Chcete zmazať rezerváciu ? ",
|
74 |
+
"confrim_delete_event_or_all": "Chcete zmazať celú opakovanú rezerváciu alebo len túto ? \r\nKliknite [OK] pre zmazanie tejto rezervácie, kliknite [Cancel] pro zmazanie celej opakovanej rezervácie",
|
75 |
+
"data_format_error": "Chybný formát ! ",
|
76 |
+
"invalid_title": "Popis rezervácie je prázdny nebo obsahuje ($<>)",
|
77 |
+
"view_no_ready": "Výpis nie je připravený",
|
78 |
+
"example": "napríklad, dovolenka pána Nováka",
|
79 |
+
"content": "Čo",
|
80 |
+
"create_event": "Vytvoriť rezerváciu",
|
81 |
+
"update_detail": "Upraviť detaily",
|
82 |
+
"click_to_detail": "Prezerať detaily",
|
83 |
+
"i_delete": "Zmazať",
|
84 |
+
"i_save": "Uložiť",
|
85 |
+
"i_close": "Zavrieť",
|
86 |
+
"day_plural": "dni",
|
87 |
+
"others": "Ostatné",
|
88 |
+
"item": "",
|
89 |
+
"loading_data":"Načítanie dát ...",
|
90 |
+
"request_processed":"Požiadavka sa spracováva ...",
|
91 |
+
"success":"Hotovo !",
|
92 |
+
"are_you_sure_delete":"Určite zmazať? ",
|
93 |
+
"ok":"Ok",
|
94 |
+
"cancel":"NEmazať",
|
95 |
+
"manage_the_calendar":"Upraviť kalendár",
|
96 |
+
"error_occurs":"Došlo k chybe",
|
97 |
+
"color":"Farba",
|
98 |
+
"invalid_date_format":"Chybný formát dátumu",
|
99 |
+
"invalid_time_format":"Chybný formát času",
|
100 |
+
"_simbol_not_allowed":"$<> nie je možné upravovať",
|
101 |
+
"subject":"Subjekt",
|
102 |
+
"time":"Čas",
|
103 |
+
"to":"Do",
|
104 |
+
"all_day_event":"Na celý deň",
|
105 |
+
"location":"Miesto",
|
106 |
+
"remark":"Popis",
|
107 |
+
"click_to_create_new_event":"Vytvoriť novú rezerváciu",
|
108 |
+
"new_event":"Nová rezervácia",
|
109 |
+
"click_to_back_to_today":"Kliknite pre návrat na dnešný deň",
|
110 |
+
"today":"Dnes",
|
111 |
+
"sday":"Den",
|
112 |
+
"week":"Týždeň",
|
113 |
+
"month":"Mesiac",
|
114 |
+
"ndays":"Dni",
|
115 |
+
"list":"List",
|
116 |
+
"nmonth":"nMesicov",
|
117 |
+
"refresh_view":"Obnoviť zobrazenie",
|
118 |
+
"refresh":"Obnoviť",
|
119 |
+
"prev":"Zpet",
|
120 |
+
"next":"Ďalší",
|
121 |
+
"loading":"Načítanie",
|
122 |
+
"error_overlapping":"This event is overlapping another event",
|
123 |
+
"sorry_could_not_load_your_data":"Skúste znovu načítať dáta",
|
124 |
+
"first":"First",
|
125 |
+
"second":"Second",
|
126 |
+
"third":"Third",
|
127 |
+
"fourth":"Fourth",
|
128 |
+
"last":"last",
|
129 |
+
"repeat":"Repeat: ",
|
130 |
+
"edit":"Edit",
|
131 |
+
"edit_recurring_event":"Edit recurring event",
|
132 |
+
"would_you_like_to_change_only_this_event_all_events_in_the_series_or_this_and_all_following_events_in_the_series":"Would you like to change only this event, all events in the series, or this and all following events in the series?",
|
133 |
+
"only_this_event":"Only this event",
|
134 |
+
"all_other_events_in_the_series_will_remain_the_same":"All other events in the series will remain the same.",
|
135 |
+
"following_events":"Following events",
|
136 |
+
"this_and_all_the_following_events_will_be_changed":"This and all the following events will be changed.",
|
137 |
+
"any_changes_to_future_events_will_be_lost":"Any changes to future events will be lost.",
|
138 |
+
"all_events":"All events",
|
139 |
+
"all_events_in_the_series_will_be_changed":"All events in the series will be changed.",
|
140 |
+
"any_changes_made_to_other_events_will_be_kept":"Any changes made to other events will be kept.",
|
141 |
+
"cancel_this_change":"Cancel this change",
|
142 |
+
"delete_recurring_event":"Delete recurring event",
|
143 |
+
"would_you_like_to_delete_only_this_event_all_events_in_the_series_or_this_and_all_future_events_in_the_series":"Would you like to delete only this event, all events in the series, or this and all future events in the series?",
|
144 |
+
"only_this_instance":"Only this instance",
|
145 |
+
"all_other_events_in_the_series_will_remain":"All other events in the series will remain.",
|
146 |
+
"all_following":"All following",
|
147 |
+
"this_and_all_the_following_events_will_be_deleted":"This and all the following events will be deleted.",
|
148 |
+
"all_events_in_the_series":"All events in the series",
|
149 |
+
"all_events_in_the_series_will_be_deleted":"All events in the series will be deleted.",
|
150 |
+
"repeats":"Repeats",
|
151 |
+
"daily":"Daily",
|
152 |
+
"every_weekday_monday_to_friday":"Every weekday (Monday to Friday)",
|
153 |
+
"every_monday_wednesday_and_friday":"Every Monday, Wednesday, and Friday",
|
154 |
+
"every_tuesday_and_thursday":"Every Tuesday, and Thursday",
|
155 |
+
"weekly":"Weekly",
|
156 |
+
"monthly":"Monthly",
|
157 |
+
"yearly":"Yearly",
|
158 |
+
"repeat_every":"Repeat every:",
|
159 |
+
"weeks":"weeks",
|
160 |
+
"repeat_on":"Repeat on:",
|
161 |
+
"repeat_by":"Repeat by:",
|
162 |
+
"day_of_the_month":"day of the month",
|
163 |
+
"day_of_the_week":"day of the week",
|
164 |
+
"starts_on":"Starts on:",
|
165 |
+
"ends":"Ends:",
|
166 |
+
"never":" Never",
|
167 |
+
"after":"After",
|
168 |
+
"occurrences":"occurrences",
|
169 |
+
"summary":"Summary:",
|
170 |
+
"every":"Every",
|
171 |
+
"weekly_on_weekdays":"Weekly on weekdays",
|
172 |
+
"weekly_on_monday_wednesday_friday":"Weekly on Monday, Wednesday, Friday",
|
173 |
+
"weekly_on_tuesday_thursday":"Weekly on Tuesday, Thursday",
|
174 |
+
"on":"on",
|
175 |
+
"on_day":"on day",
|
176 |
+
"on_the":"on the",
|
177 |
+
"months":"months",
|
178 |
+
"annually":"Annually",
|
179 |
+
"years":"years",
|
180 |
+
"once":"Once",
|
181 |
+
"times":"times",
|
182 |
+
"readmore":"read more",
|
183 |
+
"readmore_less":"less",
|
184 |
+
"until":"until"
|
185 |
+
}
|
186 |
+
});
|
DC_MultiViewCal/language/multiview_lang_sl_SI.js
ADDED
@@ -0,0 +1,186 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
var i18n = jQuery.extend({}, i18n || {}, {
|
2 |
+
dcmvcal: {
|
3 |
+
dateformat: {
|
4 |
+
"fulldaykey": "ddMMyyyy",
|
5 |
+
"fulldayshow": "L d yyyy",
|
6 |
+
"fulldayvalue": "d/M/yyyy",
|
7 |
+
"Md": "W d/M",
|
8 |
+
"nDaysView": "d/M",
|
9 |
+
"listViewDate": "d L yyyy",
|
10 |
+
"Md3": "L d",
|
11 |
+
"separator": ".",
|
12 |
+
"year_index": 2,
|
13 |
+
"month_index": 0,
|
14 |
+
"day_index": 1,
|
15 |
+
"day": "d",
|
16 |
+
"sun2": "Ne",
|
17 |
+
"mon2": "Po",
|
18 |
+
"tue2": "To",
|
19 |
+
"wed2": "Sr",
|
20 |
+
"thu2": "Če",
|
21 |
+
"fri2": "Pe",
|
22 |
+
"sat2": "So",
|
23 |
+
"sun": "Ned",
|
24 |
+
"mon": "Pon",
|
25 |
+
"tue": "Tor",
|
26 |
+
"wed": "Sre",
|
27 |
+
"thu": "Čet",
|
28 |
+
"fri": "Pet",
|
29 |
+
"sat": "Sob",
|
30 |
+
"sunday": "Nedelja",
|
31 |
+
"monday": "Ponedeljek",
|
32 |
+
"tuesday": "Torek",
|
33 |
+
"wednesday": "Sreda",
|
34 |
+
"thursday": "Četrtek",
|
35 |
+
"friday": "Petek",
|
36 |
+
"saturday": "Sobota",
|
37 |
+
"jan": "Jan",
|
38 |
+
"feb": "Feb",
|
39 |
+
"mar": "Mar",
|
40 |
+
"apr": "Apr",
|
41 |
+
"may": "Maj",
|
42 |
+
"jun": "Jun",
|
43 |
+
"jul": "Jul",
|
44 |
+
"aug": "Avg",
|
45 |
+
"sep": "Sep",
|
46 |
+
"oct": "Okt",
|
47 |
+
"nov": "Nov",
|
48 |
+
"dec": "Dec",
|
49 |
+
"l_jan": "Januar",
|
50 |
+
"l_feb": "Februar",
|
51 |
+
"l_mar": "Marec",
|
52 |
+
"l_apr": "April",
|
53 |
+
"l_may": "Maj",
|
54 |
+
"l_jun": "Junij",
|
55 |
+
"l_jul": "Julij",
|
56 |
+
"l_aug": "Avgust",
|
57 |
+
"l_sep": "September",
|
58 |
+
"l_oct": "Oktober",
|
59 |
+
"l_nov": "November",
|
60 |
+
"l_dec": "December"
|
61 |
+
},
|
62 |
+
"no_implemented": "Ni implementirano",
|
63 |
+
"to_date_view": "Kliknite za prikaz trenutnega datuma",
|
64 |
+
"i_undefined": "Nedoločeno",
|
65 |
+
"allday_event": "Celodnevni dogodek",
|
66 |
+
"repeat_event": "Ponovi dogodek",
|
67 |
+
"time": "Čas",
|
68 |
+
"event": "Dogodek",
|
69 |
+
"location": "Lokacija",
|
70 |
+
"participant": "Udeleženci",
|
71 |
+
"get_data_exception": "Izjema pri pridobivanju podatkov",
|
72 |
+
"new_event": "Nov dogodek",
|
73 |
+
"confirm_delete_event": "Resnično želite izbriati dogodek? ",
|
74 |
+
"confrim_delete_event_or_all": "Do you want to delete all repeat events or only this event? \r\nClick [OK] to delete only this event, click [Cancel] delete all events",
|
75 |
+
"data_format_error": "Napaka baze! ",
|
76 |
+
"invalid_title": "Event title can not be blank or contains ($<>)",
|
77 |
+
"view_no_ready": "Predogled ni pripravljen",
|
78 |
+
"example": "kot npr., srečanje v sobi 107",
|
79 |
+
"content": "Kaj",
|
80 |
+
"create_event": "Ustvari dogodek",
|
81 |
+
"update_detail": "Uredi podrobnosti",
|
82 |
+
"click_to_detail": "Preglej podrobnosti",
|
83 |
+
"i_delete": "Izbriši",
|
84 |
+
"i_save": "Shrani",
|
85 |
+
"i_close": "Zapri",
|
86 |
+
"day_plural": "dnevi",
|
87 |
+
"others": "Ostali",
|
88 |
+
"item": "",
|
89 |
+
"loading_data":"Nalaganje podatkov...",
|
90 |
+
"request_processed":"Zahtevek se procesira ...",
|
91 |
+
"success":"Uspešno!",
|
92 |
+
"are_you_sure_delete":"Ste prepričani da želite izbrisati dogodek",
|
93 |
+
"ok":"Vredu",
|
94 |
+
"cancel":"Prekliči",
|
95 |
+
"manage_the_calendar":"Uredi koledar",
|
96 |
+
"error_occurs":"Prišlo je do napake",
|
97 |
+
"color":"Barva",
|
98 |
+
"invalid_date_format":"Napačen format datuma",
|
99 |
+
"invalid_time_format":"Napačen format ure",
|
100 |
+
"_simbol_not_allowed":"$<> ni dovoljeno",
|
101 |
+
"subject":"Zadeva",
|
102 |
+
"time":"Čas",
|
103 |
+
"to":"Do",
|
104 |
+
"all_day_event":"Celodnevni dogodek",
|
105 |
+
"location":"Lokacija",
|
106 |
+
"remark":"Opis",
|
107 |
+
"click_to_create_new_event":"Za nov dogodek kliknite Dodaj",
|
108 |
+
"new_event":"Nov dogodek",
|
109 |
+
"click_to_back_to_today":"Kliknite za vrnitev na danes",
|
110 |
+
"today":"Danes",
|
111 |
+
"sday":"Dan",
|
112 |
+
"week":"Teden",
|
113 |
+
"month":"Mesec",
|
114 |
+
"ndays":"Dnevi",
|
115 |
+
"list":"List",
|
116 |
+
"nmonth":"nMesec",
|
117 |
+
"refresh_view":"Osveži pogled",
|
118 |
+
"refresh":"Osveži",
|
119 |
+
"prev":"Nazaj",
|
120 |
+
"next":"Naprej",
|
121 |
+
"loading":"Nalaganje",
|
122 |
+
"error_overlapping":"Ta dogodek se prekriva z drugim dogodkom",
|
123 |
+
"sorry_could_not_load_your_data":"Žal se podatki ne morejo naložiti, prosimo poskusite ponovno kasneje",
|
124 |
+
"first":"Prvi",
|
125 |
+
"second":"Drugi",
|
126 |
+
"third":"Tretji",
|
127 |
+
"fourth":"Četrti",
|
128 |
+
"last":"zadnji",
|
129 |
+
"repeat":"Ponovi: ",
|
130 |
+
"edit":"Uredi",
|
131 |
+
"edit_recurring_event":"Uredi ponavljajoč dogodek",
|
132 |
+
"would_you_like_to_change_only_this_event_all_events_in_the_series_or_this_and_all_following_events_in_the_series":"Želite spremeniti samo ta dogodek, vse dogodke v seriji ali ta dogodek in vse dogodke v seriji?",
|
133 |
+
"only_this_event":"Samo ta dogodek",
|
134 |
+
"all_other_events_in_the_series_will_remain_the_same":"Vsi ostali dogodki v seriji bodo ostali isti.",
|
135 |
+
"following_events":"Naslednji dogodki",
|
136 |
+
"this_and_all_the_following_events_will_be_changed":"Ta in vsi prihodnji dogodki bodo spremenjeni.",
|
137 |
+
"any_changes_to_future_events_will_be_lost":"Vse spremembe v prihodnjih dogodkih bodo izgubljene.",
|
138 |
+
"all_events":"Vsi dogodki",
|
139 |
+
"all_events_in_the_series_will_be_changed":"Vsi dogodki v seriji bodo spremenjeni.",
|
140 |
+
"any_changes_made_to_other_events_will_be_kept":"Vse spremembe v ostalih dogodkih bodo ohranjene.",
|
141 |
+
"cancel_this_change":"Prekliči spremembo",
|
142 |
+
"delete_recurring_event":"Izbriši ponavljajoči dogodek",
|
143 |
+
"would_you_like_to_delete_only_this_event_all_events_in_the_series_or_this_and_all_future_events_in_the_series":"Bi radi izbrisali samo ta dogodek, vse dogodke v seriji ali ta dogodek in vse dogodke v seriji?",
|
144 |
+
"only_this_instance":"Samo ta primer",
|
145 |
+
"all_other_events_in_the_series_will_remain":"Vsi drugi dogodki v seriji bodo ostali.",
|
146 |
+
"all_following":"Vsi naslednji",
|
147 |
+
"this_and_all_the_following_events_will_be_deleted":"Ta in vsi naslednji dogodki bodo izbrisani.",
|
148 |
+
"all_events_in_the_series":"Vsi dogodki v seriji",
|
149 |
+
"all_events_in_the_series_will_be_deleted":"Vsi dogodki v seriji bodo izbrisani.",
|
150 |
+
"repeats":"Ponovitve",
|
151 |
+
"daily":"Dnevno",
|
152 |
+
"every_weekday_monday_to_friday":"Vsak teden (od ponedeljka do petka)",
|
153 |
+
"every_monday_wednesday_and_friday":"Vsak ponedelje, sredo in petek",
|
154 |
+
"every_tuesday_and_thursday":"Vsak torek in četrtek",
|
155 |
+
"weekly":"Tedensko",
|
156 |
+
"monthly":"Mesečno",
|
157 |
+
"yearly":"Letno",
|
158 |
+
"repeat_every":"Ponovi vsak:",
|
159 |
+
"weeks":"tedni",
|
160 |
+
"repeat_on":"Ponovi na:",
|
161 |
+
"repeat_by":"Ponovi z:",
|
162 |
+
"day_of_the_month":"dan v mesecu",
|
163 |
+
"day_of_the_week":"dan v tednu",
|
164 |
+
"starts_on":"Pričetek:",
|
165 |
+
"ends":"Konec:",
|
166 |
+
"never":" Nikoli",
|
167 |
+
"after":"Po",
|
168 |
+
"occurrences":"dogodki",
|
169 |
+
"summary":"Povzetek:",
|
170 |
+
"every":"Vsako",
|
171 |
+
"weekly_on_weekdays":"Tedensko za vikende",
|
172 |
+
"weekly_on_monday_wednesday_friday":"Tedensko vsak ponedeljek, torek, petek",
|
173 |
+
"weekly_on_tuesday_thursday":"Tedensko vsako sredo, �četrtek",
|
174 |
+
"on":"na",
|
175 |
+
"on_day":"na dan",
|
176 |
+
"on_the":"na",
|
177 |
+
"months":"meseci",
|
178 |
+
"annually":"Vsako leto",
|
179 |
+
"years":"leta",
|
180 |
+
"once":"Enkrat",
|
181 |
+
"times":"časi",
|
182 |
+
"readmore":"read more",
|
183 |
+
"readmore_less":"less",
|
184 |
+
"until":"do"
|
185 |
+
}
|
186 |
+
});
|
DC_MultiViewCal/src/Plugins/Common.js
ADDED
@@ -0,0 +1,133 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
(function($) {
|
2 |
+
$.browser = {};
|
3 |
+
uaMatch= function(ua) {
|
4 |
+
var ret = { browser: "" };
|
5 |
+
|
6 |
+
ua = ua.toLowerCase();
|
7 |
+
|
8 |
+
if (/webkit/.test(ua)) {
|
9 |
+
ret = { browser: "webkit", version: /webkit[\/ ]([\w.]+)/ };
|
10 |
+
|
11 |
+
} else if (/opera/.test(ua)) {
|
12 |
+
ret = { browser: "opera", version: /version/.test(ua) ? /version[\/ ]([\w.]+)/ : /opera[\/ ]([\w.]+)/ };
|
13 |
+
|
14 |
+
} else if (/msie/.test(ua)) {
|
15 |
+
ret = { browser: "msie", version: /msie ([\w.]+)/ };
|
16 |
+
|
17 |
+
} else if (/mozilla/.test(ua) && !/compatible/.test(ua)) {
|
18 |
+
ret = { browser: "mozilla", version: /rv:([\w.]+)/ };
|
19 |
+
}
|
20 |
+
|
21 |
+
ret.version = (ret.version && ret.version.exec(ua) || [0, "0"])[1];
|
22 |
+
|
23 |
+
return ret;
|
24 |
+
};
|
25 |
+
browserMatch = uaMatch(navigator.userAgent);
|
26 |
+
if (browserMatch.browser) {
|
27 |
+
$.browser[browserMatch.browser] = true;
|
28 |
+
$.browser.version = browserMatch.version;
|
29 |
+
}
|
30 |
+
|
31 |
+
// Deprecated, use jQuery.browser.webkit instead
|
32 |
+
if ($.browser.webkit) {
|
33 |
+
$.browser.safari = true;
|
34 |
+
}
|
35 |
+
})(jQuery);
|
36 |
+
try { document.execCommand("BackgroundImageCache", false, true); } catch (e) { }
|
37 |
+
var popUpWin;
|
38 |
+
function PopUpCenterWindow(URLStr, width, height, newWin, scrollbars) {
|
39 |
+
var popUpWin = 0;
|
40 |
+
if (typeof (newWin) == "undefined") {
|
41 |
+
newWin = false;
|
42 |
+
}
|
43 |
+
if (typeof (scrollbars) == "undefined") {
|
44 |
+
scrollbars = 0;
|
45 |
+
}
|
46 |
+
if (typeof (width) == "undefined") {
|
47 |
+
width = 800;
|
48 |
+
}
|
49 |
+
if (typeof (height) == "undefined") {
|
50 |
+
height = 600;
|
51 |
+
}
|
52 |
+
var left = 0;
|
53 |
+
var top = 0;
|
54 |
+
if (screen.width >= width) {
|
55 |
+
left = Math.floor((screen.width - width) / 2);
|
56 |
+
}
|
57 |
+
if (screen.height >= height) {
|
58 |
+
top = Math.floor((screen.height - height) / 2);
|
59 |
+
}
|
60 |
+
if (newWin) {
|
61 |
+
open(URLStr, '', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=' + scrollbars + ',resizable=yes,copyhistory=yes,width=' + width + ',height=' + height + ',left=' + left + ', top=' + top + ',screenX=' + left + ',screenY=' + top + '');
|
62 |
+
return;
|
63 |
+
}
|
64 |
+
|
65 |
+
if (popUpWin) {
|
66 |
+
if (!popUpWin.closed) popUpWin.close();
|
67 |
+
}
|
68 |
+
popUpWin = open(URLStr, 'popUpWin', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=' + scrollbars + ',resizable=yes,copyhistory=yes,width=' + width + ',height=' + height + ',left=' + left + ', top=' + top + ',screenX=' + left + ',screenY=' + top + '');
|
69 |
+
popUpWin.focus();
|
70 |
+
}
|
71 |
+
|
72 |
+
function OpenModelWindow(url, option) {
|
73 |
+
var fun;
|
74 |
+
try {
|
75 |
+
if (parent != null && parent.$ != null && parent.$.ShowIfrmDailog != undefined) {
|
76 |
+
fun = parent.$.ShowIfrmDailog
|
77 |
+
}
|
78 |
+
else {
|
79 |
+
fun = $.ShowIfrmDailog;
|
80 |
+
}
|
81 |
+
}
|
82 |
+
catch (e) {
|
83 |
+
fun = $.ShowIfrmDailog;
|
84 |
+
}
|
85 |
+
|
86 |
+
fun(url, option);
|
87 |
+
}
|
88 |
+
function CloseModelWindow(callback, dooptioncallback) {
|
89 |
+
parent.$.closeIfrm(callback, dooptioncallback);
|
90 |
+
}
|
91 |
+
function fomartTimeAMPM(h,m,__MilitaryTime) {
|
92 |
+
if (__MilitaryTime)
|
93 |
+
var tmp = ((h < 10) ? "0" : "") + h + ":" + ((m < 10)?"0":"") + m ;
|
94 |
+
else
|
95 |
+
{
|
96 |
+
var tmp = ((h%12) < 10) && h!=12 ? "0" + (h%12) : (h==12?"12":(h%12)) ;
|
97 |
+
tmp += ":" + ((m < 10)?"0":"") + m + ((h>=12)?"pm":"am");
|
98 |
+
|
99 |
+
}
|
100 |
+
return tmp ;
|
101 |
+
}
|
102 |
+
|
103 |
+
function StrFormat(temp, dataarry) {
|
104 |
+
return temp.replace(/\{([\d]+)\}/g, function(s1, s2) { var s = dataarry[s2]; if (typeof (s) != "undefined") { if (s instanceof (Date)) { return (s.getMonth()+1)+"/"+s.getDate()+"/"+s.getFullYear()+" "+s.getHours()+":"+s.getMinutes() } else { return encodeURIComponent(s) } } else { return "" } });
|
105 |
+
}
|
106 |
+
function StrFormatNoEncode(temp, dataarry) {
|
107 |
+
return temp.replace(/\{([\d]+)\}/g, function(s1, s2) { var s = dataarry[s2]; if (typeof (s) != "undefined") { if (s instanceof (Date)) { return (s.getMonth()+1)+"/"+s.getDate()+"/"+s.getFullYear()+" "+s.getHours()+":"+s.getMinutes() } else { return (s); } } else { return ""; } });
|
108 |
+
}
|
109 |
+
function getiev($) {
|
110 |
+
var userAgent = window.navigator.userAgent.toLowerCase();
|
111 |
+
$.browser.msie8 = $.browser.msie && /msie 8\.0/i.test(userAgent);
|
112 |
+
$.browser.msie7 = $.browser.msie && /msie 7\.0/i.test(userAgent);
|
113 |
+
$.browser.msie6 = !$.browser.msie8 && !$.browser.msie7 && $.browser.msie && /msie 6\.0/i.test(userAgent);
|
114 |
+
var v;
|
115 |
+
if ($.browser.msie8) {
|
116 |
+
v = 8;
|
117 |
+
}
|
118 |
+
else if ($.browser.msie7) {
|
119 |
+
v = 7;
|
120 |
+
}
|
121 |
+
else if ($.browser.msie6) {
|
122 |
+
v = 6;
|
123 |
+
}
|
124 |
+
else { v = -1; }
|
125 |
+
return v;
|
126 |
+
}
|
127 |
+
jQuery(document).ready(function($) {
|
128 |
+
var v = getiev($);
|
129 |
+
if (v > 0) {
|
130 |
+
$(document.body).addClass("ie ie" + v);
|
131 |
+
}
|
132 |
+
|
133 |
+
});
|
DC_MultiViewCal/src/Plugins/images/buttons.gif
ADDED
Binary file
|
DC_MultiViewCal/src/Plugins/images/toolbar.gif
ADDED
Binary file
|
DC_MultiViewCal/src/Plugins/jquery.alert.js
ADDED
@@ -0,0 +1,330 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
(function(a) {
|
2 |
+
a.alerts = {
|
3 |
+
verticalOffset: -75,
|
4 |
+
horizontalOffset: 0,
|
5 |
+
repositionOnResize: true,
|
6 |
+
overlayOpacity: 0.50,
|
7 |
+
overlayColor: "#FFF",
|
8 |
+
draggable: true,
|
9 |
+
okButton: "OK",
|
10 |
+
cancelButton: "Cancel",
|
11 |
+
dialogClass: null,
|
12 |
+
alert: function(b, c, d) {
|
13 |
+
if (c == null) {
|
14 |
+
c = "OK"
|
15 |
+
}
|
16 |
+
a.alerts._show(c, b, null, "alert",
|
17 |
+
function(e) {
|
18 |
+
if (d) {
|
19 |
+
d(e)
|
20 |
+
}
|
21 |
+
},
|
22 |
+
null, null, null, null)
|
23 |
+
},
|
24 |
+
confirm: function(b, c, d) {
|
25 |
+
if (c == null) {
|
26 |
+
c = "Are you sure"
|
27 |
+
}
|
28 |
+
a.alerts._show(c, b, null, "confirm",
|
29 |
+
function(e) {
|
30 |
+
if (d) {
|
31 |
+
d(e)
|
32 |
+
}
|
33 |
+
},
|
34 |
+
null, null, null, null)
|
35 |
+
},
|
36 |
+
prompt: function(b, c, d, e) {
|
37 |
+
if (d == null) {
|
38 |
+
d = "Please enter something"
|
39 |
+
}
|
40 |
+
a.alerts._show(d, b, c, "prompt",
|
41 |
+
function(f) {
|
42 |
+
if (e) {
|
43 |
+
e(f)
|
44 |
+
}
|
45 |
+
},
|
46 |
+
null, null, null, null)
|
47 |
+
},
|
48 |
+
openBox: function(f, g, b, c, e, d, i) {
|
49 |
+
if (g == null) {
|
50 |
+
g = "Information"
|
51 |
+
}
|
52 |
+
a.alerts._show(g, f, null, "openBox",
|
53 |
+
function(h) {
|
54 |
+
if (i) {
|
55 |
+
i(h)
|
56 |
+
}
|
57 |
+
},
|
58 |
+
b, c, e, d)
|
59 |
+
},
|
60 |
+
overAlert: function(c, b) {
|
61 |
+
a.alerts._overShow(c, b)
|
62 |
+
},
|
63 |
+
_overShow: function(d, c) {
|
64 |
+
if (c == null) {
|
65 |
+
c = 3000
|
66 |
+
}
|
67 |
+
var b = c + 600;
|
68 |
+
a("body").append('<div id="over_container" style="display:none"><div id="over_message"></div></div>');
|
69 |
+
a("#over_message").text(d).html(a("#over_message").text().replace(/\n/g, "<br />"));
|
70 |
+
if (a.alerts.dialogClass) {
|
71 |
+
a("#over_container").addClass(a.alerts.dialogClass)
|
72 |
+
}
|
73 |
+
var e = (a.browser.msie && parseInt(a.browser.version) <= 6) ? "absolute" : "fixed";
|
74 |
+
a("#over_container").css({
|
75 |
+
position: e,
|
76 |
+
zIndex: 99999,
|
77 |
+
width: 350,
|
78 |
+
padding: 0,
|
79 |
+
margin: 0
|
80 |
+
}).show("fast");
|
81 |
+
a("#over_container").css({
|
82 |
+
minWidth: a("#over_container").outerWidth(),
|
83 |
+
maxWidth: a("#over_container").outerWidth()
|
84 |
+
});
|
85 |
+
a.alerts._overReposition();
|
86 |
+
setTimeout(function() {
|
87 |
+
a("#over_container").hide("fast")
|
88 |
+
},
|
89 |
+
c);
|
90 |
+
setTimeout(function() {
|
91 |
+
a("#over_container").remove()
|
92 |
+
},
|
93 |
+
b)
|
94 |
+
},
|
95 |
+
_overReposition: function() {
|
96 |
+
var c = 4;
|
97 |
+
var b = ((a(window).width() / 2) - (a("#over_container").outerWidth() / 2)) + a.alerts.horizontalOffset;
|
98 |
+
if (c < 0) {
|
99 |
+
c = 0
|
100 |
+
}
|
101 |
+
if (b < 0) {
|
102 |
+
b = 0
|
103 |
+
}
|
104 |
+
if (a.browser.msie && parseInt(a.browser.version) <= 6) {
|
105 |
+
c = c + a(window).scrollTop()
|
106 |
+
}
|
107 |
+
if (a.browser.msie && parseInt(a.browser.version) <= 6) {
|
108 |
+
b = b - 175
|
109 |
+
}
|
110 |
+
a("#over_container").css({
|
111 |
+
top: c + "px",
|
112 |
+
left: b + "px"
|
113 |
+
});
|
114 |
+
a("#popup_overlay").height(a(document).height())
|
115 |
+
},
|
116 |
+
_show: function(j, b, k, g, m, l, c, f, n) {
|
117 |
+
a.alerts._hide();
|
118 |
+
a.alerts._overlay("show");
|
119 |
+
a("body").append('<div id="popup_container" style="display:none"><h1 id="popup_title"></h1><em id="ctl"></em><em id="cbl"></em><em id="ctr"></em><em id="cbr"></em><span id="popup_close"></span><div id="popup_content"><div id="popup_message"></div></div></div>');
|
120 |
+
if (a.alerts.dialogClass) {
|
121 |
+
a("#popup_container").addClass(a.alerts.dialogClass)
|
122 |
+
}
|
123 |
+
var i = (a.browser.msie && parseInt(a.browser.version) <= 6) ? "absolute" : "fixed";
|
124 |
+
a("#popup_container").css({
|
125 |
+
position: i,
|
126 |
+
zIndex: 99999,
|
127 |
+
padding: 0,
|
128 |
+
margin: 0
|
129 |
+
}).show();
|
130 |
+
a("#popup_title").text(j);
|
131 |
+
a("#popup_content").addClass(g);
|
132 |
+
if (g != "openBox") {
|
133 |
+
a("#popup_message").text(b).html(a("#popup_message").text().replace(/\n/g, "<br />"))
|
134 |
+
}
|
135 |
+
a("#popup_container").css({});
|
136 |
+
a.alerts._reposition();
|
137 |
+
a.alerts._maintainPosition(true);
|
138 |
+
switch (g) {
|
139 |
+
case "alert":
|
140 |
+
a("#popup_message").after('<div id="popup_panel"><input type="button" value="' + a.alerts.okButton + '" id="popup_ok" /></div>');
|
141 |
+
a("#popup_ok").click(function() {
|
142 |
+
a.alerts._hide();
|
143 |
+
m(true)
|
144 |
+
});
|
145 |
+
a("#popup_ok").focus().keypress(function(h) {
|
146 |
+
if (h.keyCode == 13 || h.keyCode == 27) {
|
147 |
+
a("#popup_ok").trigger("click")
|
148 |
+
}
|
149 |
+
});
|
150 |
+
break;
|
151 |
+
case "confirm":
|
152 |
+
a("#popup_message").after('<div id="popup_panel"><input type="button" value="' + a.alerts.okButton + '" id="popup_ok" /> <input type="button" value="' + a.alerts.cancelButton + '" id="popup_cancel" /></div>');
|
153 |
+
a("#popup_ok").click(function() {
|
154 |
+
a.alerts._hide();
|
155 |
+
if (m) {
|
156 |
+
m(true)
|
157 |
+
}
|
158 |
+
});
|
159 |
+
a("#popup_cancel").click(function() {
|
160 |
+
a.alerts._hide();
|
161 |
+
if (m) {
|
162 |
+
m(false)
|
163 |
+
}
|
164 |
+
});
|
165 |
+
a("#popup_ok").focus();
|
166 |
+
a("#popup_ok, #popup_cancel").keypress(function(h) {
|
167 |
+
if (h.keyCode == 13) {
|
168 |
+
a("#popup_ok").trigger("click")
|
169 |
+
}
|
170 |
+
if (h.keyCode == 27) {
|
171 |
+
a("#popup_cancel").trigger("click")
|
172 |
+
}
|
173 |
+
});
|
174 |
+
break;
|
175 |
+
case "prompt":
|
176 |
+
a("#popup_message").append('<br /><input type="text" size="30" id="popup_prompt" />').after('<div id="popup_panel"><input type="button" value="' + a.alerts.okButton + '" id="popup_ok" /> <input type="button" value="' + a.alerts.cancelButton + '" id="popup_cancel" /></div>');
|
177 |
+
a("#popup_prompt").width(a("#popup_message").width() - 10);
|
178 |
+
a("#popup_ok").click(function() {
|
179 |
+
var e = a("#popup_prompt").val();
|
180 |
+
a.alerts._hide();
|
181 |
+
if (m) {
|
182 |
+
m(e)
|
183 |
+
}
|
184 |
+
});
|
185 |
+
a("#popup_cancel").click(function() {
|
186 |
+
a.alerts._hide();
|
187 |
+
if (m) {
|
188 |
+
m(null)
|
189 |
+
}
|
190 |
+
});
|
191 |
+
a("#popup_prompt, #popup_ok, #popup_cancel").keypress(function(h) {
|
192 |
+
if (h.keyCode == 13) {
|
193 |
+
a("#popup_ok").trigger("click")
|
194 |
+
}
|
195 |
+
if (h.keyCode == 27) {
|
196 |
+
a("#popup_cancel").trigger("click")
|
197 |
+
}
|
198 |
+
});
|
199 |
+
if (k) {
|
200 |
+
a("#popup_prompt").val(k)
|
201 |
+
}
|
202 |
+
a("#popup_prompt").focus().select();
|
203 |
+
break;
|
204 |
+
case "openBox":
|
205 |
+
a("#popup_message").append(a(b).html());
|
206 |
+
if (l) {
|
207 |
+
a("#popup_container").css({
|
208 |
+
width:
|
209 |
+
l + "px"
|
210 |
+
})
|
211 |
+
}
|
212 |
+
if (c) {
|
213 |
+
a("#popup_container").css({
|
214 |
+
height: c + "px"
|
215 |
+
});
|
216 |
+
a("#popup_message").css({
|
217 |
+
height: (c - 48) + "px"
|
218 |
+
})
|
219 |
+
}
|
220 |
+
a.alerts._reposition();
|
221 |
+
if (f) {
|
222 |
+
a(f).click(function() {
|
223 |
+
a.alerts._hide();
|
224 |
+
if (m) {
|
225 |
+
m(true)
|
226 |
+
}
|
227 |
+
})
|
228 |
+
}
|
229 |
+
if (n) {
|
230 |
+
a(n).click(function() {
|
231 |
+
a.alerts._hide();
|
232 |
+
return false;
|
233 |
+
if (m) {
|
234 |
+
m(false)
|
235 |
+
}
|
236 |
+
})
|
237 |
+
}
|
238 |
+
break
|
239 |
+
}
|
240 |
+
a("#popup_close").click(function() {
|
241 |
+
a.alerts._hide();
|
242 |
+
if (m) {
|
243 |
+
m()
|
244 |
+
}
|
245 |
+
});
|
246 |
+
if (a.alerts.draggable) {
|
247 |
+
try {
|
248 |
+
a("#popup_container").draggable({
|
249 |
+
handle: a("#popup_title")
|
250 |
+
});
|
251 |
+
a("#popup_title").css({
|
252 |
+
cursor: "move"
|
253 |
+
})
|
254 |
+
} catch (d) { }
|
255 |
+
}
|
256 |
+
},
|
257 |
+
_hide: function() {
|
258 |
+
a("#popup_container").remove();
|
259 |
+
a.alerts._overlay("hide");
|
260 |
+
a.alerts._maintainPosition(false)
|
261 |
+
},
|
262 |
+
_overlay: function(b) {
|
263 |
+
switch (b) {
|
264 |
+
case "show":
|
265 |
+
a.alerts._overlay("hide");
|
266 |
+
a("BODY").append('<div id="popup_overlay"></div>');
|
267 |
+
a("#popup_overlay").css({
|
268 |
+
position:
|
269 |
+
"absolute",
|
270 |
+
zIndex: 99998,
|
271 |
+
top: "0px",
|
272 |
+
left: "0px",
|
273 |
+
width: "100%",
|
274 |
+
height: a(document).height(),
|
275 |
+
background: a.alerts.overlayColor,
|
276 |
+
opacity: a.alerts.overlayOpacity
|
277 |
+
});
|
278 |
+
break;
|
279 |
+
case "hide":
|
280 |
+
a("#popup_overlay").remove();
|
281 |
+
break
|
282 |
+
}
|
283 |
+
},
|
284 |
+
_reposition: function() {
|
285 |
+
var c = ((a(window).height() / 2) - (a("#popup_container").height() / 2)) + a.alerts.verticalOffset;
|
286 |
+
var b = ((a(window).width() / 2) - (a("#popup_container").width() / 2)) + a.alerts.horizontalOffset;
|
287 |
+
if (c < 0) {
|
288 |
+
c = 0
|
289 |
+
}
|
290 |
+
if (b < 0) {
|
291 |
+
b = 0
|
292 |
+
}
|
293 |
+
if (a.browser.msie && parseInt(a.browser.version) <= 6) {
|
294 |
+
c = c + a(window).scrollTop()
|
295 |
+
}
|
296 |
+
a("#popup_container").css({
|
297 |
+
top: c + "px",
|
298 |
+
left: b + "px"
|
299 |
+
});
|
300 |
+
a("#popup_overlay").height(a(document).height())
|
301 |
+
},
|
302 |
+
_maintainPosition: function(b) {
|
303 |
+
if (a.alerts.repositionOnResize) {
|
304 |
+
switch (b) {
|
305 |
+
case true:
|
306 |
+
a(window).bind("resize", a.alerts._reposition);
|
307 |
+
break;
|
308 |
+
case false:
|
309 |
+
a(window).unbind("resize", a.alerts._reposition);
|
310 |
+
break
|
311 |
+
}
|
312 |
+
}
|
313 |
+
}
|
314 |
+
};
|
315 |
+
hiAlert = function(b, c, d) {
|
316 |
+
a.alerts.alert(b, c, d)
|
317 |
+
};
|
318 |
+
hiConfirm = function(b, c, d) {
|
319 |
+
a.alerts.confirm(b, c, d)
|
320 |
+
};
|
321 |
+
hiPrompt = function(b, c, d, e) {
|
322 |
+
a.alerts.prompt(b, c, d, e)
|
323 |
+
};
|
324 |
+
hiBox = function(f, g, b, c, e, d, i) {
|
325 |
+
a.alerts.openBox(f, g, b, c, e, d, i)
|
326 |
+
};
|
327 |
+
hiOverAlert = function(c, b) {
|
328 |
+
a.alerts.overAlert(c, b)
|
329 |
+
}
|
330 |
+
})(jQuery);
|
DC_MultiViewCal/src/Plugins/jquery.calendar.js
ADDED
@@ -0,0 +1,4149 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* @description {Class} wdCalendar
|
3 |
+
* This is the main class of wdCalendar.
|
4 |
+
*/
|
5 |
+
; (function($) {
|
6 |
+
var __WDAY = new Array(i18n.dcmvcal.dateformat.sun, i18n.dcmvcal.dateformat.mon, i18n.dcmvcal.dateformat.tue, i18n.dcmvcal.dateformat.wed, i18n.dcmvcal.dateformat.thu, i18n.dcmvcal.dateformat.fri, i18n.dcmvcal.dateformat.sat);
|
7 |
+
var __WDAYLarge = new Array(i18n.dcmvcal.dateformat.sunday, i18n.dcmvcal.dateformat.monday, i18n.dcmvcal.dateformat.tuesday, i18n.dcmvcal.dateformat.wednesday, i18n.dcmvcal.dateformat.thursday, i18n.dcmvcal.dateformat.friday, i18n.dcmvcal.dateformat.saturday);
|
8 |
+
var __WDAY2 = new Array(i18n.dcmvcal.dateformat.sun2, i18n.dcmvcal.dateformat.mon2, i18n.dcmvcal.dateformat.tue2, i18n.dcmvcal.dateformat.wed2, i18n.dcmvcal.dateformat.thu2, i18n.dcmvcal.dateformat.fri2, i18n.dcmvcal.dateformat.sat2);
|
9 |
+
var __MonthName = new Array(i18n.dcmvcal.dateformat.jan, i18n.dcmvcal.dateformat.feb, i18n.dcmvcal.dateformat.mar, i18n.dcmvcal.dateformat.apr, i18n.dcmvcal.dateformat.may, i18n.dcmvcal.dateformat.jun, i18n.dcmvcal.dateformat.jul, i18n.dcmvcal.dateformat.aug, i18n.dcmvcal.dateformat.sep, i18n.dcmvcal.dateformat.oct, i18n.dcmvcal.dateformat.nov, i18n.dcmvcal.dateformat.dec);
|
10 |
+
var __MonthNameLarge = new Array(i18n.dcmvcal.dateformat.l_jan, i18n.dcmvcal.dateformat.l_feb, i18n.dcmvcal.dateformat.l_mar, i18n.dcmvcal.dateformat.l_apr, i18n.dcmvcal.dateformat.l_may, i18n.dcmvcal.dateformat.l_jun, i18n.dcmvcal.dateformat.l_jul, i18n.dcmvcal.dateformat.l_aug, i18n.dcmvcal.dateformat.l_sep, i18n.dcmvcal.dateformat.l_oct, i18n.dcmvcal.dateformat.l_nov, i18n.dcmvcal.dateformat.l_dec);
|
11 |
+
var __MilitaryTime = true;
|
12 |
+
var __TheContainer = "";
|
13 |
+
var arrs = new Array
|
14 |
+
arrs[i18n.dcmvcal.dateformat.year_index] = "yyyy";
|
15 |
+
arrs[i18n.dcmvcal.dateformat.month_index] = "M";
|
16 |
+
arrs[i18n.dcmvcal.dateformat.day_index] = "d";
|
17 |
+
i18n.dcmvcal.dateformat.fulldayvalue = arrs.join(i18n.dcmvcal.dateformat.separator);
|
18 |
+
if (!Clone || typeof (Clone) != "function") {
|
19 |
+
var Clone = function(obj) {
|
20 |
+
var objClone = new Object();
|
21 |
+
if (obj.constructor == Object) {
|
22 |
+
objClone = new obj.constructor();
|
23 |
+
} else {
|
24 |
+
objClone = new obj.constructor(obj.valueOf());
|
25 |
+
}
|
26 |
+
for (var key in obj) {
|
27 |
+
if (objClone[key] != obj[key]) {
|
28 |
+
if (typeof (obj[key]) == 'object') {
|
29 |
+
objClone[key] = Clone(obj[key]);
|
30 |
+
} else {
|
31 |
+
objClone[key] = obj[key];
|
32 |
+
}
|
33 |
+
}
|
34 |
+
}
|
35 |
+
objClone.toString = obj.toString;
|
36 |
+
objClone.valueOf = obj.valueOf;
|
37 |
+
return objClone;
|
38 |
+
}
|
39 |
+
}
|
40 |
+
if (!dateFormat || typeof (dateFormat) != "function") {
|
41 |
+
var dateFormat = function(format) {
|
42 |
+
var o = {
|
43 |
+
"M+": this.getMonth() + 1,
|
44 |
+
"d+": this.getDate(),
|
45 |
+
"h+": this.getHours(),
|
46 |
+
"H+": this.getHours(),
|
47 |
+
"m+": this.getMinutes(),
|
48 |
+
"s+": this.getSeconds(),
|
49 |
+
"q+": Math.floor((this.getMonth() + 3) / 3),
|
50 |
+
"w": "0123456".indexOf(this.getDay()),
|
51 |
+
"W": __WDAY[this.getDay()],
|
52 |
+
"L": __MonthName[this.getMonth()] //non-standard
|
53 |
+
};
|
54 |
+
if (/(y+)/.test(format)) {
|
55 |
+
format = format.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length));
|
56 |
+
}
|
57 |
+
var format1 = format;
|
58 |
+
for (var k in o) {
|
59 |
+
if ((new RegExp("(" + k + ")").test(format)) && (new RegExp("(" + k + ")").test(format1)))
|
60 |
+
format = format.replace(RegExp.$1, RegExp.$1.length == 1 ? o[k] : ("00" + o[k]).substr(("" + o[k]).length));
|
61 |
+
}
|
62 |
+
return format;
|
63 |
+
};
|
64 |
+
}
|
65 |
+
if (!DateAdd || typeof (DateDiff) != "function") {
|
66 |
+
var DateAdd = function(interval, number, idate) {
|
67 |
+
number = parseInt(number);
|
68 |
+
var date;
|
69 |
+
if (typeof (idate) == "string") {
|
70 |
+
date = idate.split(/\D/);
|
71 |
+
eval("var date = new Date(" + date.join(",") + ")");
|
72 |
+
}
|
73 |
+
|
74 |
+
if (typeof (idate) == "object") {
|
75 |
+
date = new Date(idate.toString());
|
76 |
+
}
|
77 |
+
switch (interval) {
|
78 |
+
case "y": date.setFullYear(date.getFullYear() + number); break;
|
79 |
+
case "m": date.setMonth(date.getMonth() + number); break;
|
80 |
+
case "d": date.setDate(date.getDate() + number); break;
|
81 |
+
case "w": date.setDate(date.getDate() + 7 * number); break;
|
82 |
+
case "h": date.setHours(date.getHours() + number); break;
|
83 |
+
case "n": date.setMinutes(date.getMinutes() + number); break;
|
84 |
+
case "s": date.setSeconds(date.getSeconds() + number); break;
|
85 |
+
case "l": date.setMilliseconds(date.getMilliseconds() + number); break;
|
86 |
+
}
|
87 |
+
return date;
|
88 |
+
}
|
89 |
+
}
|
90 |
+
if (!DateDiff || typeof (DateDiff) != "function") {
|
91 |
+
var DateDiff = function(interval, d1, d2) {
|
92 |
+
switch (interval) {
|
93 |
+
case "d": //date
|
94 |
+
case "w":
|
95 |
+
d1 = new Date(d1.getFullYear(), d1.getMonth(), d1.getDate());
|
96 |
+
d2 = new Date(d2.getFullYear(), d2.getMonth(), d2.getDate());
|
97 |
+
break; //w
|
98 |
+
case "h":
|
99 |
+
d1 = new Date(d1.getFullYear(), d1.getMonth(), d1.getDate(), d1.getHours());
|
100 |
+
d2 = new Date(d2.getFullYear(), d2.getMonth(), d2.getDate(), d2.getHours());
|
101 |
+
break; //h
|
102 |
+
case "n":
|
103 |
+
d1 = new Date(d1.getFullYear(), d1.getMonth(), d1.getDate(), d1.getHours(), d1.getMinutes());
|
104 |
+
d2 = new Date(d2.getFullYear(), d2.getMonth(), d2.getDate(), d2.getHours(), d2.getMinutes());
|
105 |
+
break;
|
106 |
+
case "s":
|
107 |
+
d1 = new Date(d1.getFullYear(), d1.getMonth(), d1.getDate(), d1.getHours(), d1.getMinutes(), d1.getSeconds());
|
108 |
+
d2 = new Date(d2.getFullYear(), d2.getMonth(), d2.getDate(), d2.getHours(), d2.getMinutes(), d2.getSeconds());
|
109 |
+
break;
|
110 |
+
}
|
111 |
+
var t1 = d1.getTime(), t2 = d2.getTime();
|
112 |
+
var diff = NaN;
|
113 |
+
switch (interval) {
|
114 |
+
case "y": diff = d2.getFullYear() - d1.getFullYear(); break; //y
|
115 |
+
case "m": diff = (d2.getFullYear() - d1.getFullYear()) * 12 + d2.getMonth() - d1.getMonth(); break; //m
|
116 |
+
case "d": diff = Math.floor(t2 / 86400000) - Math.floor(t1 / 86400000); break;
|
117 |
+
case "w": diff = Math.floor((t2 + 345600000) / (604800000)) - Math.floor((t1 + 345600000) / (604800000)); break; //w
|
118 |
+
case "h": diff = Math.floor(t2 / 3600000) - Math.floor(t1 / 3600000); break; //h
|
119 |
+
case "n": diff = Math.floor(t2 / 60000) - Math.floor(t1 / 60000); break; //
|
120 |
+
case "s": diff = Math.floor(t2 / 1000) - Math.floor(t1 / 1000); break; //s
|
121 |
+
case "l": diff = t2 - t1; break;
|
122 |
+
}
|
123 |
+
return diff;
|
124 |
+
|
125 |
+
}
|
126 |
+
}
|
127 |
+
if ($.fn.noSelect == undefined) {
|
128 |
+
$.fn.noSelect = function(p) { //no select plugin by me :-)
|
129 |
+
if (p == null)
|
130 |
+
prevent = true;
|
131 |
+
else
|
132 |
+
prevent = p;
|
133 |
+
if (prevent) {
|
134 |
+
return this.each(function() {
|
135 |
+
if ($.browser.msie || $.browser.safari) $(this).bind('selectstart', function(e) { return false; });
|
136 |
+
else if ($.browser.mozilla) {
|
137 |
+
$(this).css('MozUserSelect', 'none');
|
138 |
+
$('body').trigger('focus');
|
139 |
+
}
|
140 |
+
else if ($.browser.opera) $(this).bind('mousedown', function(e) { e.stopPropagation(); });
|
141 |
+
else $(this).attr('unselectable', 'on');
|
142 |
+
});
|
143 |
+
|
144 |
+
} else {
|
145 |
+
return this.each(function() {
|
146 |
+
if ($.browser.msie || $.browser.safari) $(this).unbind('selectstart');
|
147 |
+
else if ($.browser.mozilla) $(this).css('MozUserSelect', 'inherit');
|
148 |
+
else if ($.browser.opera) $(this).unbind('mousedown');
|
149 |
+
else $(this).removeAttr('unselectable', 'on');
|
150 |
+
});
|
151 |
+
|
152 |
+
}
|
153 |
+
}; //end noSelect
|
154 |
+
}
|
155 |
+
$.fn.bcalendar = function(option) {
|
156 |
+
var def = {
|
157 |
+
newWidthGroup:0,
|
158 |
+
newWidthGroupCalculate:false,
|
159 |
+
list_eventsPerPage:0,
|
160 |
+
currentlist:{dend:"",idend:0},
|
161 |
+
cachepages:new Array(),
|
162 |
+
lastdate : "",
|
163 |
+
page:0,
|
164 |
+
numberOfMonths : 12,
|
165 |
+
/**
|
166 |
+
* @description {Config} view
|
167 |
+
* {String} Three calendar view provided, 'day','week','month'. 'week' by default.
|
168 |
+
*/
|
169 |
+
view: "nMonth",
|
170 |
+
/**
|
171 |
+
* @description {Config} weekstartday
|
172 |
+
* {Number} First day of week 0 for Sun, 1 for Mon, 2 for Tue.
|
173 |
+
*/
|
174 |
+
weekstartday: 0, //start from Sunday by default
|
175 |
+
showtooltip:false,
|
176 |
+
tooltipon:1,
|
177 |
+
shownavigate:false,
|
178 |
+
navigateurl:"",
|
179 |
+
target:0,
|
180 |
+
theme: "#"+option.paletteDefault, //theme no
|
181 |
+
/**
|
182 |
+
* @description {Config} height
|
183 |
+
* {Number} Calendar height, false for page height by default.
|
184 |
+
*/
|
185 |
+
height: false,
|
186 |
+
/**
|
187 |
+
* @description {Config} url
|
188 |
+
* {String} Url to request calendar data.
|
189 |
+
*/
|
190 |
+
url: "",
|
191 |
+
/**
|
192 |
+
* @description {Config} eventItems
|
193 |
+
* {Array} event items for initialization.
|
194 |
+
*/
|
195 |
+
eventItems: [],
|
196 |
+
method: "POST",
|
197 |
+
/**
|
198 |
+
* @description {Config} showday
|
199 |
+
* {Date} Current date. today by default.
|
200 |
+
*/
|
201 |
+
showday: new Date(),
|
202 |
+
/**
|
203 |
+
* @description {Event} onBeforeRequestData:function(stage)
|
204 |
+
* Fired before any ajax request is sent.
|
205 |
+
* @param {Number} stage. 1 for retrieving events, 2 - adding event, 3 - removiing event, 4 - update event.
|
206 |
+
*/
|
207 |
+
onBeforeRequestData: false,
|
208 |
+
/**
|
209 |
+
* @description {Event} onAfterRequestData:function(stage)
|
210 |
+
* Fired before any ajax request is finished.
|
211 |
+
* @param {Number} stage. 1 for retrieving events, 2 - adding event, 3 - removiing event, 4 - update event.
|
212 |
+
*/
|
213 |
+
onAfterRequestData: false,
|
214 |
+
/**
|
215 |
+
* @description {Event} onAfterRequestData:function(stage)
|
216 |
+
* Fired when some errors occur while any ajax request is finished.
|
217 |
+
* @param {Number} stage. 1 for retrieving events, 2 - adding event, 3 - removiing event, 4 - update event.
|
218 |
+
*/
|
219 |
+
onRequestDataError: false,
|
220 |
+
|
221 |
+
onWeekOrMonthToDay: false,
|
222 |
+
/**
|
223 |
+
* @description {Event} quickAddHandler:function(calendar, param )
|
224 |
+
* Fired when user quick adds an item. If this function is set, ajax request to quickAddUrl will abort.
|
225 |
+
* @param {Object} calendar Calendar object.
|
226 |
+
* @param {Array} param Format [{name:"name1", value:"value1"}, ...]
|
227 |
+
*
|
228 |
+
*/
|
229 |
+
quickAddHandler: false,
|
230 |
+
/**
|
231 |
+
* @description {Config} quickAddUrl
|
232 |
+
* {String} Url for quick adding.
|
233 |
+
*/
|
234 |
+
quickAddUrl: "",
|
235 |
+
/**
|
236 |
+
* @description {Config} quickUpdateUrl
|
237 |
+
* {String} Url for time span update.
|
238 |
+
*/
|
239 |
+
quickUpdateUrl: "",
|
240 |
+
/**
|
241 |
+
* @description {Config} quickDeleteUrl
|
242 |
+
* {String} Url for removing an event.
|
243 |
+
*/
|
244 |
+
quickDeleteUrl: "",
|
245 |
+
/**
|
246 |
+
* @description {Config} autoload
|
247 |
+
* {Boolean} If event items is empty, and this param is set to true.
|
248 |
+
* Event will be retrieved by ajax call right after calendar is initialized.
|
249 |
+
*/
|
250 |
+
autoload: false,
|
251 |
+
/**
|
252 |
+
* @description {Config} readonly
|
253 |
+
* {Boolean} Indicate calendar is readonly or editable
|
254 |
+
*/
|
255 |
+
readonly: false,
|
256 |
+
/**
|
257 |
+
* @description {Config} extParam
|
258 |
+
* {Array} Extra params submitted to server.
|
259 |
+
* Sample - [{name:"param1", value:"value1"}, {name:"param2", value:"value2"}]
|
260 |
+
*/
|
261 |
+
extParam: [],
|
262 |
+
/**
|
263 |
+
* @description {Config} enableDrag
|
264 |
+
* {Boolean} Whether end user can drag event item by mouse.
|
265 |
+
*/
|
266 |
+
enableDrag: true,
|
267 |
+
loadDateR: []
|
268 |
+
};
|
269 |
+
var eventDiv = $("#gridEvent"+option.thecontainer);
|
270 |
+
if (eventDiv.length == 0) {
|
271 |
+
eventDiv = $("<div id='gridEvent"+option.thecontainer+"' style='display:none;'></div>").appendTo(document.body);
|
272 |
+
}
|
273 |
+
var gridcontainer = $(this);
|
274 |
+
option = $.extend(def, option);
|
275 |
+
__MilitaryTime = option.militaryTime;
|
276 |
+
//no quickUpdateUrl, dragging disabled.
|
277 |
+
if (option.quickUpdateUrl == null || option.quickUpdateUrl == "") {
|
278 |
+
option.enableDrag = false;
|
279 |
+
}
|
280 |
+
if (option.rowsByCategory == "dc_subjects" || option.rowsByCategory == "dc_locations" )
|
281 |
+
option.rowsList = eval(option.rowsByCategory);
|
282 |
+
if (option.dayWithTime && option.view=="day")
|
283 |
+
option.rowsList = "";
|
284 |
+
if (option.dayWithColumns == "dc_subjects" || option.dayWithColumns == "dc_locations" )
|
285 |
+
option.columnsList = eval(option.dayWithColumns);
|
286 |
+
//template for month and date
|
287 |
+
var __SCOLLEVENTTEMP = "<DIV style=\"WIDTH:${width};top:${top};left:${left};\" title1=\"${title}\" class=\"chip chip${i} ${drag}\"><div class=\"dhdV\" style=\"display:none\">${data}</div><DIV style=\"BORDER-BOTTOM-COLOR:${bdcolor}\" class=ct> </DIV><DL class=\"${userEdition}\" style=\"BORDER-BOTTOM-COLOR:${bdcolor}; BACKGROUND-COLOR:${bgcolor1}; BORDER-TOP-COLOR: ${bdcolor}; HEIGHT: ${height}px; BORDER-RIGHT-COLOR:${bdcolor}; BORDER-LEFT-COLOR:${bdcolor}\"><DT style=\"BACKGROUND-COLOR:${bgcolor2}\">${starttime} - ${endtime} ${icon}</DT><DD><SPAN class=\"t-title\">${content}</SPAN><div class=\"t-loc\">${location}</div><div class=\"t-desc\">${description}</div></DD><DIV class='resizer' style='display:${redisplay}'><DIV class=rszr_icon> </DIV></DIV></DL><DIV style=\"BORDER-BOTTOM-COLOR:${bdcolor}; BACKGROUND-COLOR:${bgcolor1}; BORDER-TOP-COLOR: ${bdcolor}; BORDER-RIGHT-COLOR: ${bdcolor}; BORDER-LEFT-COLOR:${bdcolor}\" class=cb1> </DIV><DIV style=\"BORDER-BOTTOM-COLOR:${bdcolor}; BORDER-TOP-COLOR:${bdcolor}; BORDER-RIGHT-COLOR:${bdcolor}; BORDER-LEFT-COLOR:${bdcolor}\" class=cb2> </DIV></DIV>";
|
288 |
+
var __ALLDAYEVENTTEMP = '<div class="rb-o ${eclass}" id="${id}" title1="${title}" style="color:${color};"><div class="dhdV" style="display:none">${data}</div><div class="${extendClass} rb-m" style="background-color:${color}"><div class="rb-i t-title ${userEdition}">${content}</div><div class="rb-i t-loc">${location}</div><div class="rb-i t-desc">${description}</div></div></div>';
|
289 |
+
var __MonthDays = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
|
290 |
+
var __LASSOTEMP = "<div class='drag-lasso' style='left:${left}px;top:${top}px;width:${width}px;height:${height}px;'> </div>";
|
291 |
+
var __VIEWWEEKDAYS = option.viewWeekDays;
|
292 |
+
var __VIEWWEEKDAYSTOTAL = 0;
|
293 |
+
for (i=0;i<__VIEWWEEKDAYS.length;i++)
|
294 |
+
__VIEWWEEKDAYSTOTAL += __VIEWWEEKDAYS[i];
|
295 |
+
//for dragging var
|
296 |
+
var _dragdata;
|
297 |
+
var _dragevent;
|
298 |
+
|
299 |
+
//clear DOM
|
300 |
+
clearcontainer();
|
301 |
+
|
302 |
+
//no height specified in options, we get page height.
|
303 |
+
if (!option.height) {
|
304 |
+
option.height = document.documentElement.clientHeight;
|
305 |
+
}
|
306 |
+
//if (option.view == "day" || option.view == "week" || option.view == "nDays")
|
307 |
+
{
|
308 |
+
if (option.height/(option.hoursEnd-option.hoursStart+1)>option.cellheight)
|
309 |
+
option.cellheight = Math.ceil(option.height/(option.hoursEnd-option.hoursStart+1));
|
310 |
+
if (option.cellheight%2==1) option.cellheight++;
|
311 |
+
|
312 |
+
}
|
313 |
+
|
314 |
+
|
315 |
+
//populate events data for first display.
|
316 |
+
if (option.url && option.autoload) {
|
317 |
+
render();
|
318 |
+
var d = getRdate();
|
319 |
+
if (option.view!="list")
|
320 |
+
pushER(d.start, d.end);
|
321 |
+
populate();
|
322 |
+
}
|
323 |
+
else {
|
324 |
+
//contruct HTML
|
325 |
+
render();
|
326 |
+
//get date range
|
327 |
+
var d = getRdate();
|
328 |
+
if (option.view!="list")
|
329 |
+
pushER(d.start, d.end);
|
330 |
+
}
|
331 |
+
|
332 |
+
//clear DOM
|
333 |
+
function clearcontainer() {
|
334 |
+
gridcontainer.empty();
|
335 |
+
}
|
336 |
+
//get range
|
337 |
+
function getRdate() {
|
338 |
+
return { start: option.vstart, end: option.vend };
|
339 |
+
}
|
340 |
+
//add date range to cache.
|
341 |
+
function pushER(start, end) {
|
342 |
+
var ll = option.loadDateR.length;
|
343 |
+
if (!end) {
|
344 |
+
end = start;
|
345 |
+
}
|
346 |
+
if (ll == 0) {
|
347 |
+
option.loadDateR.push({ startdate: start, enddate: end });
|
348 |
+
}
|
349 |
+
else {
|
350 |
+
for (var i = 0; i < ll; i++) {
|
351 |
+
var dr = option.loadDateR[i];
|
352 |
+
var diff = DateDiff("d", start, dr.startdate);
|
353 |
+
if (diff == 0 || diff == 1) {
|
354 |
+
if (dr.enddate < end) {
|
355 |
+
dr.enddate = end;
|
356 |
+
}
|
357 |
+
break;
|
358 |
+
}
|
359 |
+
else if (diff > 1) {
|
360 |
+
var d2 = DateDiff("d", end, dr.startdate);
|
361 |
+
if (d2 > 1) {
|
362 |
+
option.loadDateR.splice(0, 0, { startdate: start, enddate: end });
|
363 |
+
}
|
364 |
+
else {
|
365 |
+
dr.startdate = start;
|
366 |
+
if (dr.enddate < end) {
|
367 |
+
dr.enddate = end;
|
368 |
+
}
|
369 |
+
}
|
370 |
+
break;
|
371 |
+
}
|
372 |
+
else {
|
373 |
+
var d3 = DateDiff("d", end, dr.startdate);
|
374 |
+
|
375 |
+
if (dr.enddate < end) {
|
376 |
+
if (d3 < 1) {
|
377 |
+
dr.enddate = end;
|
378 |
+
break;
|
379 |
+
}
|
380 |
+
else {
|
381 |
+
if (i == ll - 1) {
|
382 |
+
option.loadDateR.push({ startdate: start, enddate: end });
|
383 |
+
}
|
384 |
+
}
|
385 |
+
}
|
386 |
+
}
|
387 |
+
}
|
388 |
+
//end for
|
389 |
+
//clear
|
390 |
+
ll = option.loadDateR.length;
|
391 |
+
if (ll > 1) {
|
392 |
+
for (var i = 0; i < ll - 1; ) {
|
393 |
+
var d1 = option.loadDateR[i];
|
394 |
+
var d2 = option.loadDateR[i + 1];
|
395 |
+
|
396 |
+
var diff1 = DateDiff("d", d2.startdate, d1.enddate);
|
397 |
+
if (diff1 <= 1) {
|
398 |
+
d1.startdate = d2.startdate > d1.startdate ? d1.startdate : d2.startdate;
|
399 |
+
d1.enddate = d2.enddate > d1.enddate ? d2.enddate : d1.enddate;
|
400 |
+
option.loadDateR.splice(i + 1, 1);
|
401 |
+
ll--;
|
402 |
+
continue;
|
403 |
+
}
|
404 |
+
i++;
|
405 |
+
}
|
406 |
+
}
|
407 |
+
}
|
408 |
+
}
|
409 |
+
function adaptWH()
|
410 |
+
{
|
411 |
+
$(".multicalendar").each(function(){
|
412 |
+
var h = 0;
|
413 |
+
$(this).find(".ui-datepicker-group").each(function(){
|
414 |
+
if (h < ($(this).css("height").replace("px","")*1)) h = $(this).css("height").replace("px","")*1;
|
415 |
+
});
|
416 |
+
if (h!=0) $(this).find(".ui-datepicker-group").each(function(){$(this).css("height",h+"px");});
|
417 |
+
});
|
418 |
+
}
|
419 |
+
$(window).resize(function() {
|
420 |
+
adaptWH();
|
421 |
+
if (option.newWidthGroupCalculate)
|
422 |
+
{
|
423 |
+
option.newWidthGroup = 0;
|
424 |
+
render();
|
425 |
+
}
|
426 |
+
|
427 |
+
});
|
428 |
+
//contruct DOM
|
429 |
+
function render() {
|
430 |
+
//params needed
|
431 |
+
//viewType, showday, events, config
|
432 |
+
if (option.view=="list")
|
433 |
+
$("#sfprevbtn"+option.thecontainer+",#sfnextbtn"+option.thecontainer).addClass("nav_list");
|
434 |
+
else
|
435 |
+
$("#sfprevbtn"+option.thecontainer+",#sfnextbtn"+option.thecontainer).removeClass("nav_list");
|
436 |
+
if (option.mindate!="" && option.mindate>option.showday)
|
437 |
+
option.showday = option.mindate;
|
438 |
+
if (option.maxdate!="" && option.maxdate<option.showday)
|
439 |
+
option.showday = option.maxdate;
|
440 |
+
if (option.vstart && option.vend)
|
441 |
+
{
|
442 |
+
if (option.view=="month" || option.view=="nMonth")
|
443 |
+
{
|
444 |
+
if (option.view=="month")
|
445 |
+
var meses = 1;
|
446 |
+
else
|
447 |
+
var meses = option.numberOfMonths;
|
448 |
+
var firstdate = new Date(option.showday.getFullYear(), option.showday.getMonth(), 1);
|
449 |
+
var m = (option.showday.getMonth()+meses)%12;
|
450 |
+
var y = option.showday.getFullYear()+Math.floor((option.showday.getMonth()+meses)/12);
|
451 |
+
var enddate = new Date(y, m, 1);
|
452 |
+
enddate = DateAdd("d", -1 , enddate);
|
453 |
+
|
454 |
+
}
|
455 |
+
else
|
456 |
+
{
|
457 |
+
var firstdate = option.vstart;
|
458 |
+
var enddate = option.vend;
|
459 |
+
}
|
460 |
+
if (option.mindate>=firstdate && option.mindate<=enddate)
|
461 |
+
{
|
462 |
+
$("#sfprevbtn"+option.thecontainer).find(".ui-icon-circle-triangle-w").css({ opacity: 0.3 });
|
463 |
+
$("#sfprevbtn"+option.thecontainer).addClass("non-navigate");
|
464 |
+
}
|
465 |
+
else
|
466 |
+
{
|
467 |
+
$("#sfprevbtn"+option.thecontainer).find(".ui-icon-circle-triangle-w").css({ opacity: 1 });
|
468 |
+
$("#sfprevbtn"+option.thecontainer).removeClass("non-navigate");
|
469 |
+
}
|
470 |
+
if (option.maxdate>=firstdate && option.maxdate<=enddate)
|
471 |
+
{
|
472 |
+
$("#sfnextbtn"+option.thecontainer).find(".ui-icon-circle-triangle-e").css({ opacity: 0.3 });
|
473 |
+
$("#sfnextbtn"+option.thecontainer).addClass("non-navigate");
|
474 |
+
}
|
475 |
+
else
|
476 |
+
{
|
477 |
+
$("#sfnextbtn"+option.thecontainer).find(".ui-icon-circle-triangle-e").css({ opacity: 1 });
|
478 |
+
$("#sfnextbtn"+option.thecontainer).removeClass("non-navigate");
|
479 |
+
}
|
480 |
+
}
|
481 |
+
|
482 |
+
var showday = new Date(option.showday.getFullYear(), option.showday.getMonth(), option.showday.getDate());
|
483 |
+
var events = option.eventItems;
|
484 |
+
|
485 |
+
var config = { view: option.view, weekstartday: option.weekstartday, theme: option.theme,thecontainer: option.thecontainer };
|
486 |
+
if (option.view == "day" || option.view == "week" || option.view == "nDays") {
|
487 |
+
var $dvtec = $("#dvtec"+option.thecontainer);
|
488 |
+
if ($dvtec.length > 0) {
|
489 |
+
option.scoll = $dvtec.attr("scrollTop"); //get scroll bar position
|
490 |
+
}
|
491 |
+
}
|
492 |
+
gridcontainer.parent().parent().width("100%");
|
493 |
+
|
494 |
+
switch (option.view) {
|
495 |
+
case "day":
|
496 |
+
BuildDaysAndWeekView(showday, 1, events, config);
|
497 |
+
if (option.rowsList=="")
|
498 |
+
gridcontainer.css("overflow-y", "visible").height(option.height - 8);
|
499 |
+
else
|
500 |
+
gridcontainer.height("auto");
|
501 |
+
break;
|
502 |
+
case "week":
|
503 |
+
BuildDaysAndWeekView(showday, 7, events, config);
|
504 |
+
if (option.rowsList=="")
|
505 |
+
gridcontainer.css("overflow-y", "visible").height(option.height - 8);
|
506 |
+
else
|
507 |
+
gridcontainer.height("auto");
|
508 |
+
break;
|
509 |
+
case "month":
|
510 |
+
BuildMonthView(showday, events, config);
|
511 |
+
gridcontainer.css("overflow-y", "visible").height(option.height - 8);
|
512 |
+
$("#gridcontainer"+option.thecontainer+" [display='0']").css("display","none");
|
513 |
+
break;
|
514 |
+
case "nDays":
|
515 |
+
BuildDaysAndWeekView(showday, option.numberOfDays, events, config);
|
516 |
+
if (option.rowsList=="")
|
517 |
+
gridcontainer.css("overflow-y", "visible").height(option.height - 8);
|
518 |
+
else
|
519 |
+
gridcontainer.height("auto");
|
520 |
+
break;
|
521 |
+
case "list":
|
522 |
+
BuildListView(showday, option.list_eventsPerPage, events, config);
|
523 |
+
gridcontainer.height("auto");
|
524 |
+
break;
|
525 |
+
case "nMonth":
|
526 |
+
BuildYearView(showday, events, config);
|
527 |
+
gridcontainer.css("overflow-y", "visible");
|
528 |
+
var gW = gridcontainer.width()-2;//padding:5p
|
529 |
+
if (option.numberOfMonths==1)
|
530 |
+
if (option.newWidthGroup!=0)
|
531 |
+
{
|
532 |
+
gridcontainer.parent().parent().parent().width(option.newWidthGroup);
|
533 |
+
gridcontainer.children().children().width(option.newWidthGroup-12);//padding:5px
|
534 |
+
}
|
535 |
+
else
|
536 |
+
{
|
537 |
+
option.newWidthGroupCalculate = true;
|
538 |
+
gridcontainer.parent().parent().width($('#nmonths'+option.thecontainer).children().width()+12);//padding:5px
|
539 |
+
}
|
540 |
+
else if (option.newWidthGroup!=0)
|
541 |
+
{
|
542 |
+
$('#nmonths'+option.thecontainer).find('.ui-datepicker-multi').width(gW);
|
543 |
+
$('#nmonths'+option.thecontainer).find('.ui-datepicker-multi .ui-datepicker-group').width(option.newWidthGroup);
|
544 |
+
}
|
545 |
+
else
|
546 |
+
{
|
547 |
+
option.newWidthGroupCalculate = true;
|
548 |
+
$('#nmonths'+option.thecontainer).find('.ui-datepicker-multi').width(gW);
|
549 |
+
var iW = 2000;
|
550 |
+
$('.ui-datepicker-group .ui-datepicker-calendar').each(function(i) {
|
551 |
+
if (iW>$(this).width())
|
552 |
+
iW=$(this).width();
|
553 |
+
});
|
554 |
+
iW +=4; //margin:1px;border:1px
|
555 |
+
var cN = (Math.floor(gW/iW)==0)?1:Math.floor(gW/iW);
|
556 |
+
var nW = Math.floor(gW/cN);
|
557 |
+
nW -=4; //margin:1px;border:1px
|
558 |
+
option.newWidthGroup = nW;
|
559 |
+
$('#nmonths'+option.thecontainer).find('.ui-datepicker-multi .ui-datepicker-group').width(nW);
|
560 |
+
}
|
561 |
+
gridcontainer.height($('#nmonths'+option.thecontainer).height());
|
562 |
+
break;
|
563 |
+
default:
|
564 |
+
alert(i18n.dcmvcal.no_implemented);
|
565 |
+
break;
|
566 |
+
}
|
567 |
+
initevents(option.view);
|
568 |
+
ResizeView(option);
|
569 |
+
if ( !(option.rowsList=="" || (option.dayWithTime && option.view=="day")) )
|
570 |
+
for (var i=0;i<option.rowsList.length;i++)
|
571 |
+
{
|
572 |
+
if (Math.round((option.height - 50)/option.rowsList.length)>$("#weekViewAllDaywk"+option.thecontainer+i+" table").height())
|
573 |
+
$("#weekViewAllDaywk"+option.thecontainer+i).height(Math.round((option.height - 50)/option.rowsList.length));
|
574 |
+
}
|
575 |
+
|
576 |
+
|
577 |
+
}
|
578 |
+
function BuildYearView(showday, events, config) {
|
579 |
+
|
580 |
+
var firstdate = new Date(showday.getFullYear(), showday.getMonth(), 1);
|
581 |
+
var m = (showday.getMonth()+option.numberOfMonths)%12;
|
582 |
+
var y = showday.getFullYear()+Math.floor((showday.getMonth()+option.numberOfMonths)/12);
|
583 |
+
var enddate = new Date(y, m, 1);
|
584 |
+
enddate = DateAdd("d", -1 , enddate);
|
585 |
+
option.vstart = firstdate;
|
586 |
+
option.vend = enddate;
|
587 |
+
option.datestrshow = CalDateShow(option.vstart, option.vend);
|
588 |
+
|
589 |
+
var html = [];
|
590 |
+
html.push("<div id=\"nmonths"+config.thecontainer+"\" class=\"nmonths\" >");
|
591 |
+
html.push("</div>");
|
592 |
+
gridcontainer.html(html.join(""));
|
593 |
+
|
594 |
+
|
595 |
+
//if (events.length>0)
|
596 |
+
if (true)
|
597 |
+
{
|
598 |
+
var dates = [];
|
599 |
+
for (i=0;i<events.length;i++)
|
600 |
+
{
|
601 |
+
var d1 = events[i][2];
|
602 |
+
d1 = new Date(d1.getFullYear(), d1.getMonth(), d1.getDate());
|
603 |
+
var d2 = events[i][3];
|
604 |
+
d2 = new Date(d2.getFullYear(), d2.getMonth(), d2.getDate());
|
605 |
+
var item = "";
|
606 |
+
while (d1<=d2)
|
607 |
+
{
|
608 |
+
item = d1.getFullYear()+"/"+(d1.getMonth()+1)+"/"+d1.getDate();
|
609 |
+
if (!dates[item])
|
610 |
+
dates[item] = [];
|
611 |
+
dates[item][dates[item].length] = events[i];
|
612 |
+
|
613 |
+
d1 = DateAdd("d", 1 , d1);
|
614 |
+
}
|
615 |
+
|
616 |
+
}
|
617 |
+
|
618 |
+
var old_fn = $.datepicker._updateDatepicker;
|
619 |
+
$.datepicker._updateDatepicker = function(inst) {
|
620 |
+
old_fn.call(this, inst);
|
621 |
+
adaptWH();
|
622 |
+
}
|
623 |
+
var mydatepicker = $( "#nmonths"+option.thecontainer ).datepicker({numberOfMonths: option.numberOfMonths,firstDay:option.weekstartday,defaultDate:showday,showOtherMonths: true,
|
624 |
+
monthNamesShort:__MonthName,
|
625 |
+
monthNames:__MonthNameLarge,
|
626 |
+
dayNamesShort:__WDAY,
|
627 |
+
dayNamesMin:__WDAY2,
|
628 |
+
onChangeMonthYear: function(year, month, inst){
|
629 |
+
var c = $(this).datepicker("getDate");
|
630 |
+
var n = new Date(year,(month-1),1);
|
631 |
+
if (c>n)
|
632 |
+
var p = $("#gridcontainer"+option.thecontainer).previousRange().BcalGetOp();
|
633 |
+
else
|
634 |
+
var p = $("#gridcontainer"+option.thecontainer).nextRange().BcalGetOp();
|
635 |
+
if (p && p.datestrshow)
|
636 |
+
$("#txtdatetimeshow"+option.thecontainer).text(p.datestrshow);
|
637 |
+
},
|
638 |
+
beforeShowDay: function (d1){
|
639 |
+
if (__VIEWWEEKDAYS[0]==0 && d1.getDay()==0) return [true,"specialday"];
|
640 |
+
else if (__VIEWWEEKDAYS[1]==0 && d1.getDay()==1) return [true,"specialday"];
|
641 |
+
else if (__VIEWWEEKDAYS[2]==0 && d1.getDay()==2) return [true,"specialday"];
|
642 |
+
else if (__VIEWWEEKDAYS[3]==0 && d1.getDay()==3) return [true,"specialday"];
|
643 |
+
else if (__VIEWWEEKDAYS[4]==0 && d1.getDay()==4) return [true,"specialday"];
|
644 |
+
else if (__VIEWWEEKDAYS[5]==0 && d1.getDay()==5) return [true,"specialday"];
|
645 |
+
else if (__VIEWWEEKDAYS[6]==0 && d1.getDay()==6) return [true,"specialday"];
|
646 |
+
else
|
647 |
+
{
|
648 |
+
var item = d1.getFullYear()+"/"+(d1.getMonth()+1)+"/"+d1.getDate();
|
649 |
+
//alert(this.hasClass("ui-datepicker-other-month"));
|
650 |
+
if (dates[item])
|
651 |
+
return [true,"ui-state-active",dateFormat.call(d1, i18n.dcmvcal.dateformat.fulldayvalue)];
|
652 |
+
else
|
653 |
+
return [true,"ui-state-non-active",dateFormat.call(d1, i18n.dcmvcal.dateformat.fulldayvalue)];
|
654 |
+
}
|
655 |
+
}
|
656 |
+
|
657 |
+
});
|
658 |
+
if (__VIEWWEEKDAYS[0]==0) $(".ui-datepicker span[title='Sunday']").parent().css("display","none");
|
659 |
+
if (__VIEWWEEKDAYS[1]==0) $(".ui-datepicker span[title='Monday']").parent().css("display","none");
|
660 |
+
if (__VIEWWEEKDAYS[2]==0) $(".ui-datepicker span[title='Tuesday']").parent().css("display","none");
|
661 |
+
if (__VIEWWEEKDAYS[3]==0) $(".ui-datepicker span[title='Wednesday']").parent().css("display","none");
|
662 |
+
if (__VIEWWEEKDAYS[4]==0) $(".ui-datepicker span[title='Thursday']").parent().css("display","none");
|
663 |
+
if (__VIEWWEEKDAYS[5]==0) $(".ui-datepicker span[title='Friday']").parent().css("display","none");
|
664 |
+
if (__VIEWWEEKDAYS[6]==0) $(".ui-datepicker span[title='Saturday']").parent().css("display","none");
|
665 |
+
$("#nmonths"+option.thecontainer+" .ui-datepicker-other-month").attr("title","");
|
666 |
+
if (option.date_box_with_color_in_nmonth_view)
|
667 |
+
{
|
668 |
+
$("#nmonths"+option.thecontainer+" .ui-state-active").each(function(){
|
669 |
+
try{
|
670 |
+
var item = datetostr(strtodate($(this).attr("title")+" 00:00"));
|
671 |
+
if (item && dates[item] && (dates[item].length>0))
|
672 |
+
{
|
673 |
+
var colors = new Array();
|
674 |
+
var html = "";
|
675 |
+
var c = "#"+option.paletteDefault;
|
676 |
+
for (var i=0;i<dates[item].length;i++)
|
677 |
+
{
|
678 |
+
c = ((dates[item][i][7]!=-1 && dates[item][i][7]!=null)?dates[item][i][7]:"#"+option.paletteDefault);
|
679 |
+
if ($.inArray( c, colors)==-1)
|
680 |
+
colors[colors.length] = c;
|
681 |
+
}
|
682 |
+
if (colors.length==1) $(this).css("background",colors[colors.length-1]);
|
683 |
+
else
|
684 |
+
{
|
685 |
+
var count = colors.length;
|
686 |
+
$(this).css("vertical-align","top").css("padding","0px");
|
687 |
+
html += '<div style="position:relative;border:0px solid;padding:0px;margin:0px;">';
|
688 |
+
var top = 0;
|
689 |
+
var height = parseInt($(this).css("height"));
|
690 |
+
for (var i=0;i<count;i++)
|
691 |
+
{
|
692 |
+
h = Math.round(height/count*(i+1))-top;
|
693 |
+
|
694 |
+
html += '<div style="position:absolute;margin:0px;padding:0px;border:0px solid;width:100%;background:'+colors[i]+';height:'+h+'px;top:'+top+'px;left:0px;"></div>';
|
695 |
+
top = Math.round(height/count*(i+1));
|
696 |
+
}
|
697 |
+
html += '<div style="position:absolute;margin:0px;padding:0px;border:0px solid;width:100%;background:transparent;height:'+height+'px;top:0px;left:0px;">'+$(this).html()+'</div>';
|
698 |
+
html += '</div>';
|
699 |
+
$(this).html(html);
|
700 |
+
//$(this).find("a").bind('click', function(e) {return false;});
|
701 |
+
}
|
702 |
+
}
|
703 |
+
}catch (e) {}
|
704 |
+
});
|
705 |
+
}
|
706 |
+
$("#nmonths"+option.thecontainer+" .ui-state-active a").bind('click', function(e) {
|
707 |
+
if (__VIEWWEEKDAYS[0]==0) $(".ui-datepicker span[title='Sunday']").parent().css("display","none");
|
708 |
+
if (__VIEWWEEKDAYS[1]==0) $(".ui-datepicker span[title='Monday']").parent().css("display","none");
|
709 |
+
if (__VIEWWEEKDAYS[2]==0) $(".ui-datepicker span[title='Tuesday']").parent().css("display","none");
|
710 |
+
if (__VIEWWEEKDAYS[3]==0) $(".ui-datepicker span[title='Wednesday']").parent().css("display","none");
|
711 |
+
if (__VIEWWEEKDAYS[4]==0) $(".ui-datepicker span[title='Thursday']").parent().css("display","none");
|
712 |
+
if (__VIEWWEEKDAYS[5]==0) $(".ui-datepicker span[title='Friday']").parent().css("display","none");
|
713 |
+
if (__VIEWWEEKDAYS[6]==0) $(".ui-datepicker span[title='Saturday']").parent().css("display","none");
|
714 |
+
if (option.shownavigate)
|
715 |
+
{
|
716 |
+
var item = datetostr(strtodate($(this).parents(".ui-state-active").attr("title")+" 00:00"));
|
717 |
+
var i = item.split("/");
|
718 |
+
var title = new Date(i[0],i[1]-1,i[2]);
|
719 |
+
|
720 |
+
title = dateFormat.call(title, i18n.dcmvcal.dateformat.fulldayvalue);
|
721 |
+
var navigateurl = option.navigateurl.replace(/the_current_date/g,title);
|
722 |
+
if (option.target==1)
|
723 |
+
document.location = navigateurl;
|
724 |
+
else
|
725 |
+
window.open(navigateurl);
|
726 |
+
}
|
727 |
+
e.stopPropagation();
|
728 |
+
return false;
|
729 |
+
});
|
730 |
+
function showDialogNMonth(dates,item,idover)
|
731 |
+
{
|
732 |
+
var i = item.split("/");
|
733 |
+
var titleDay = new Date(i[0],i[1]-1,i[2]);
|
734 |
+
title = dateFormat.call(titleDay, i18n.dcmvcal.dateformat.fulldayshow);
|
735 |
+
var str = "", d="", d1="",d2="", d1h="",d2h="";
|
736 |
+
var showTitle = true;
|
737 |
+
if (dates[item])
|
738 |
+
{
|
739 |
+
for (var i=0;i<dates[item].length;i++)
|
740 |
+
{
|
741 |
+
d1 = dateFormat.call(dates[item][i][2], i18n.dcmvcal.dateformat.fulldayshow);
|
742 |
+
d1h = fomartTimeAMPM(dates[item][i][2].getHours(),dates[item][i][2].getMinutes(),__MilitaryTime);
|
743 |
+
d2 = dateFormat.call(dates[item][i][3], i18n.dcmvcal.dateformat.fulldayshow);
|
744 |
+
d2h = fomartTimeAMPM(dates[item][i][3].getHours(),dates[item][i][3].getMinutes(),__MilitaryTime);
|
745 |
+
|
746 |
+
if (d1==d2)
|
747 |
+
{
|
748 |
+
d = "<div class=\"mv_dlg_nmonth_date\">" + d1 + '</div>';
|
749 |
+
if (dates[item][i][4]!=1)
|
750 |
+
d += " " + d1h+" - "+d2h;
|
751 |
+
}
|
752 |
+
else
|
753 |
+
{
|
754 |
+
//if (showTitle && (d1!=title))
|
755 |
+
showTitle = false;
|
756 |
+
if (dates[item][i][4]!=1)
|
757 |
+
d = "<div class=\"mv_dlg_nmonth_date\">" + d1+ "</div> "+d1h+" - <div class=\"mv_dlg_nmonth_date\">"+d2+"</div> "+d2h;
|
758 |
+
else
|
759 |
+
d = "<div class=\"mv_dlg_nmonth_date\">" + d1 +" - "+d2+'</div>';
|
760 |
+
}
|
761 |
+
if (option.readonly != true && (option.userEdit || option.userDel || ((option.userOwner==dates[item][i][12]) && (option.userEditOwner || option.userDelOwner))))
|
762 |
+
var classEdition = "dialogNMonth_event";
|
763 |
+
else
|
764 |
+
var classEdition = "";
|
765 |
+
str += '<div class="'+classEdition+'"><div class="dialogNMonth_event_links">';
|
766 |
+
if (option.readonly != true && (option.userEdit || ((option.userOwner==dates[item][i][12]) && option.userEditOwner)))
|
767 |
+
str += '<a href="#" class="dlgNMonth_editlink" id="editlink'+dates[item][i][0]+'">' + i18n.dcmvcal.update_detail + '</a>';
|
768 |
+
if (option.readonly != true && (option.userDel || ((option.userOwner==dates[item][i][12]) && option.userDelOwner)))
|
769 |
+
str += '<a href="#" class="dlgNMonth_dellink" id="dellink'+dates[item][i][0]+'">' + i18n.dcmvcal.i_delete + '</a>';
|
770 |
+
str += '</div><div class="dialogNMonth_event_content" style="border-left:3px solid '+((dates[item][i][7]!=-1 && dates[item][i][7]!=null)?dates[item][i][7]:"#"+option.paletteDefault)+';">' + d + "<div>"+dates[item][i][1]+"</div>"+((dates[item][i][9]!="" && dates[item][i][9]!=null)?"<div>"+dates[item][i][9]+"</div>":"")+((dates[item][i][11]!="" && dates[item][i][11]!="<br />" && dates[item][i][11]!=null)?"<div>"+dates[item][i][11]+"</div>":"") + "</div></div>";
|
771 |
+
}
|
772 |
+
if (!option.readonly && option.userAdd)
|
773 |
+
str += '<div><a href="#" class="dlgNMonth_createlink" id="createlink">' + i18n.dcmvcal.create_event + ' - ' +title+ '</a></div>';
|
774 |
+
|
775 |
+
try {$("#bbit-cs-buddle").dialog("close");}catch (e) {}
|
776 |
+
try {$(".mv_dlg_nmonth").dialog("close");}catch (e) {}
|
777 |
+
if (showTitle)
|
778 |
+
str = "<div class=\"mv_dlg_nmonth_title\">" + title + "</div>" + str;
|
779 |
+
$(idover).html(str);
|
780 |
+
$(".mv_dlg_nmonth_date").css("font-weight","bold");
|
781 |
+
if (showTitle)
|
782 |
+
$(".mv_dlg_nmonth_date").css("display","none");
|
783 |
+
else
|
784 |
+
$(".mv_dlg_nmonth_date").css("display","inline");
|
785 |
+
try {$(idover).dialog( "option", "title", title)}catch (e) {}
|
786 |
+
for (var i=0;i<dates[item].length;i++)
|
787 |
+
{
|
788 |
+
$("#editlink"+dates[item][i][0]).data("cdata", dates[item][i]);
|
789 |
+
$("#dellink"+dates[item][i][0]).data("cdata", dates[item][i]);
|
790 |
+
}
|
791 |
+
$("#createlink").data("cdata", titleDay);
|
792 |
+
$(".dlgNMonth_createlink").click(function(e) {
|
793 |
+
try {$(".mv_dlg_nmonth").dialog("close");}catch (e) {}
|
794 |
+
if (option.EditCmdhandler && $.isFunction(option.EditCmdhandler))
|
795 |
+
option.EditCmdhandler.call(this, ['0', "", $("#createlink").data("cdata"), $("#createlink").data("cdata"), 1]);
|
796 |
+
|
797 |
+
realsedragevent();
|
798 |
+
e.stopPropagation();
|
799 |
+
return false;
|
800 |
+
});
|
801 |
+
$(".dlgNMonth_editlink").click(function(e) {
|
802 |
+
try {$(".mv_dlg_nmonth").dialog("close");}catch (e) {}
|
803 |
+
if (option.EditCmdhandler && $.isFunction(option.EditCmdhandler))
|
804 |
+
option.EditCmdhandler.call(this, $("#"+$(this).attr("id")).data("cdata"));
|
805 |
+
realsedragevent();
|
806 |
+
e.stopPropagation();
|
807 |
+
return false;
|
808 |
+
});
|
809 |
+
$(".dlgNMonth_dellink").bind("click",function(e) {
|
810 |
+
|
811 |
+
try {$(".mv_dlg_nmonth").dialog("close");}catch (e) {}
|
812 |
+
if (option.DeleteCmdhandler && $.isFunction(option.DeleteCmdhandler))
|
813 |
+
option.DeleteCmdhandler.call(this, $("#"+$(this).attr("id")).data("cdata"), quickd);
|
814 |
+
realsedragevent();
|
815 |
+
e.stopPropagation();
|
816 |
+
return false;
|
817 |
+
});
|
818 |
+
$(idover).dialog('open');
|
819 |
+
move_mv_dlg();
|
820 |
+
}
|
821 |
+
}
|
822 |
+
$("#nmonths"+option.thecontainer+" .ui-state-non-active a").bind('click', function(e) {
|
823 |
+
var item = datetostr(strtodate($(this).parent().attr("title")+" 00:00"));
|
824 |
+
var arrdays = item.split('/');
|
825 |
+
var start = new Date(arrdays[0], arrdays[1]-1, arrdays[2]);
|
826 |
+
quickadd(start, start, true, { left: e.pageX, top: e.pageY });
|
827 |
+
e.stopPropagation();
|
828 |
+
return false;
|
829 |
+
})
|
830 |
+
if (option.showtooltip || option.readonly != true)
|
831 |
+
{
|
832 |
+
if (option.tooltipon!=0)
|
833 |
+
{
|
834 |
+
|
835 |
+
$("#nmonths"+option.thecontainer+" .ui-state-active a").bind('click', function(e) {
|
836 |
+
var item = datetostr(strtodate($(this).parents(".ui-state-active").attr("title")+" 00:00"));
|
837 |
+
var idover = "myover"+item.replace(/\//g,"_");
|
838 |
+
$(".ui-dialog-content").remove();
|
839 |
+
$(this).parent().append("<div class=\""+idover+"\" ></div>");
|
840 |
+
idover = "."+idover;
|
841 |
+
$(idover).dialog({autoOpen: false ,width:option.dialogWidth,
|
842 |
+
modal: false,resizable: false,maxWidth: option.dialogWidth,fluid: true,open: function(event, ui){fluidDialog();},
|
843 |
+
position: {
|
844 |
+
my: "left top",
|
845 |
+
at: "center bottom",
|
846 |
+
collision: "fit",
|
847 |
+
of: $(idover).parent()
|
848 |
+
}
|
849 |
+
}).addClass("mv_dlg_nmonth").parent().addClass("mv_dlg") ;
|
850 |
+
$("<div id=\"mv_corner\" />").appendTo($(".mv_dlg .ui-dialog-titlebar"));
|
851 |
+
showDialogNMonth(dates,item,idover);
|
852 |
+
//e.stopPropagation();
|
853 |
+
e.stopPropagation();
|
854 |
+
}).bind('mouseout',function(){
|
855 |
+
});;
|
856 |
+
}
|
857 |
+
else if (option.tooltipon==0)
|
858 |
+
{
|
859 |
+
$("#nmonths"+option.thecontainer+" .ui-state-active").bind('mouseover', function(){
|
860 |
+
if (!$(this).hasClass("ui-datepicker-other-month"))
|
861 |
+
{
|
862 |
+
$(".ui-dialog-content").remove();
|
863 |
+
$(this).append("<div class=\"myover\" ></div>");
|
864 |
+
$(".myover").dialog({autoOpen: false ,width:option.dialogWidth,
|
865 |
+
modal: false,resizable: false,maxWidth: option.dialogWidth,fluid: true,open: function(event, ui){fluidDialog();},
|
866 |
+
position: {
|
867 |
+
my: "left top",
|
868 |
+
at: "center bottom",
|
869 |
+
collision: "fit",
|
870 |
+
of: $(".myover").parent()
|
871 |
+
}
|
872 |
+
}).addClass("mv_dlg_nmonth").parent().addClass("mv_dlg");
|
873 |
+
$("<div id=\"mv_corner\" />").appendTo($(".mv_dlg .ui-dialog-titlebar"));
|
874 |
+
try { var item = datetostr(strtodate($(this).attr("title")+" 00:00"));showDialogNMonth(dates,item,".myover"); }catch (e) {}
|
875 |
+
}
|
876 |
+
}).bind('mouseout',function(){
|
877 |
+
});
|
878 |
+
}
|
879 |
+
$(".mv_dlg_nmonth").remove();
|
880 |
+
}
|
881 |
+
}
|
882 |
+
return;
|
883 |
+
|
884 |
+
}
|
885 |
+
//build list view
|
886 |
+
function BuildListView(startday, l, events, config) {
|
887 |
+
if (!option.theme_list || option.theme_list=="")
|
888 |
+
option.theme_list = '<div><div class="list_event_content" style="border-left:3px solid ${color};"><div class="list_event_date" option="1${option}"><div class="list_date">${date_start}</div></div><div class="list_event_date" option="2${option}"><div class="list_date">${date_start}</div><div class="list_time">${time_start} - ${time_end}</div></div><div class="list_event_date" option="3${option}"><div class="list_date">${date_start} - ${date_end}</div></div><div class="list_event_date" option="4${option}"><div class="list_date">${date_start}</div><div class="list_time">${time_start}</div> - <div class="list_date">${date_end}</div><div class="list_time">${time_end}</div></div><div class="itemlist_title">${title}</div><div class="itemlist_location">${location}</div><div class="itemlist_description" readmore_url="">${description}</div></div></div>';
|
889 |
+
option.theme_list = option.theme_list.replace(/\n/g,"");
|
890 |
+
option.theme_list = option.theme_list.replace(/\r/g,"");
|
891 |
+
if (!option.header) option.header="";
|
892 |
+
if (!option.footer) option.footer="";
|
893 |
+
if (!option.find) option.find="";
|
894 |
+
var header = option.theme_list.match("<header>(.*)</header>");
|
895 |
+
if (header && header.length>1) option.header = header[1];
|
896 |
+
option.theme_list = option.theme_list.replace(/<header>(.*)<\/header>/,"");
|
897 |
+
var find = option.theme_list.match("<find>(.*)</find>");
|
898 |
+
if (find && find.length>1) option.find = find[1].split(",");
|
899 |
+
option.theme_list = option.theme_list.replace(/<find>(.*)<\/find>/,"");
|
900 |
+
var footer = option.theme_list.match("<footer>(.*)<\/footer>");
|
901 |
+
if (footer && footer.length>1) option.footer = footer[1];
|
902 |
+
option.theme_list = option.theme_list.replace(/<footer>(.*)<\/footer>/,"");
|
903 |
+
option.vstart = startday;
|
904 |
+
option.vend = startday;
|
905 |
+
var p = {};
|
906 |
+
var html = [];
|
907 |
+
html.push("<div id=\"listcontainer"+config.thecontainer+"\" class=\"listcontainer\">");
|
908 |
+
var str = "";
|
909 |
+
var eNumber = 0;
|
910 |
+
var noShow = false;
|
911 |
+
if (option.cachepages.length>option.page)
|
912 |
+
html.push(option.cachepages[option.page]);
|
913 |
+
else
|
914 |
+
{
|
915 |
+
for (var i = 0; (i<events.length);i++)
|
916 |
+
{
|
917 |
+
noShow = false;
|
918 |
+
p.date_start = dateFormat.call(events[i][2], i18n.dcmvcal.dateformat.fulldayshow);
|
919 |
+
p.date_start_year = dateFormat.call(events[i][2], "yyyy");
|
920 |
+
p.date_start_month = dateFormat.call(events[i][2], "MM");
|
921 |
+
p.date_start_day = dateFormat.call(events[i][2], "dd");
|
922 |
+
p.date_start_monthName = __MonthName[events[i][2].getMonth()];
|
923 |
+
p.date_start_monthNameLarge = __MonthNameLarge[events[i][2].getMonth()];
|
924 |
+
p.date_start_weekday = __WDAYLarge[events[i][2].getDay()];
|
925 |
+
|
926 |
+
p.time_start = fomartTimeAMPM(events[i][2].getHours(),events[i][2].getMinutes(),__MilitaryTime);
|
927 |
+
|
928 |
+
p.date_end = dateFormat.call(events[i][3], i18n.dcmvcal.dateformat.fulldayshow);
|
929 |
+
p.date_end_year = dateFormat.call(events[i][3], "yyyy");
|
930 |
+
p.date_end_month = dateFormat.call(events[i][3], "MM");
|
931 |
+
p.date_end_day = dateFormat.call(events[i][3], "dd");
|
932 |
+
p.date_end_monthName = __MonthName[events[i][3].getMonth()];
|
933 |
+
p.date_end_monthNameLarge = __MonthNameLarge[events[i][3].getMonth()];
|
934 |
+
p.date_end_weekday = __WDAYLarge[events[i][3].getDay()];
|
935 |
+
|
936 |
+
p.time_end = fomartTimeAMPM(events[i][3].getHours(),events[i][3].getMinutes(),__MilitaryTime);
|
937 |
+
|
938 |
+
if (p.date_start==p.date_end)
|
939 |
+
{
|
940 |
+
p.option = 1;
|
941 |
+
if (events[i][4]!=1)
|
942 |
+
p.option = 2;
|
943 |
+
}
|
944 |
+
else
|
945 |
+
{
|
946 |
+
if (events[i][4]!=1)
|
947 |
+
p.option = 4;
|
948 |
+
else
|
949 |
+
p.option = 3;
|
950 |
+
}
|
951 |
+
|
952 |
+
var description = "";
|
953 |
+
if (events[i][11]!="" && events[i][11]!="<br />" && events[i][11]!=null)
|
954 |
+
{
|
955 |
+
if (option.list_readmore_numberofwords==0)
|
956 |
+
description = events[i][11];
|
957 |
+
else
|
958 |
+
{
|
959 |
+
var val = $.trim(events[i][11]), // Remove spaces from b/e of string
|
960 |
+
val = $("<div/>").html(val).text();
|
961 |
+
words = val.replace(/\s+/gi, ' ').split(' '); // word-splits
|
962 |
+
if (words.length>option.list_readmore_numberofwords)
|
963 |
+
{
|
964 |
+
val = "";
|
965 |
+
for (var w=0;w<option.list_readmore_numberofwords;w++)
|
966 |
+
val += " "+ words[w];
|
967 |
+
description = '<div class="description_short">'+$.trim(val)+' ... <a href="" class="readmore short">'+i18n.dcmvcal.readmore+'</a></div>';
|
968 |
+
description += '<div class="description_large">'+events[i][11]+' <a href="" class="readmore large">'+i18n.dcmvcal.readmore_less+'</a></div>';
|
969 |
+
}
|
970 |
+
else
|
971 |
+
{
|
972 |
+
val = events[i][11];
|
973 |
+
description = events[i][11];
|
974 |
+
}
|
975 |
+
|
976 |
+
}
|
977 |
+
}
|
978 |
+
p.id = events[i][0];
|
979 |
+
p.color = ((events[i][7]!=-1 && events[i][7]!=null)?events[i][7]:"#"+option.paletteDefault);
|
980 |
+
p.title = events[i][1];
|
981 |
+
p.location = (events[i][9]!="" && events[i][9]!=null)?events[i][9]:"";
|
982 |
+
p.description = description;
|
983 |
+
if ((i==0) && (option.header!="")) str = '<div class="headerlist">'+Tp(option.header, p)+'</div>';
|
984 |
+
eNumber++;
|
985 |
+
var therule = (events[i][6]!="" && events[i][6] != null && events[i][6] != undefined)
|
986 |
+
if (option.lastdate!="" && ((!therule && events[i][0]==option.currentlist.idend) || (therule && events[i][2].toString()==option.currentlist.dend.toString())))
|
987 |
+
{
|
988 |
+
eNumber = 0;
|
989 |
+
str = "";
|
990 |
+
if (option.header!="") str = '<div class="headerlist">'+Tp(option.header, p)+'</div>';
|
991 |
+
|
992 |
+
noShow = true;
|
993 |
+
}
|
994 |
+
if (eNumber<=option.list_eventsPerPage && (!noShow))
|
995 |
+
{
|
996 |
+
var str1 = Tp(option.theme_list, p);
|
997 |
+
for (var k=0;k<option.find.length;k++)
|
998 |
+
if (str1.toLowerCase().indexOf(option.find[k].toLowerCase())!=-1)
|
999 |
+
str1 = str1.replace("find_and_replace","find_and_replace "+option.find[k]);
|
1000 |
+
str += str1;
|
1001 |
+
eMax = i;
|
1002 |
+
}
|
1003 |
+
|
1004 |
+
}
|
1005 |
+
if (eNumber>0)
|
1006 |
+
{
|
1007 |
+
option.currentlist = {dend:events[eMax][2],idend:events[eMax][0]};
|
1008 |
+
str +='<div class="listnav">';
|
1009 |
+
{
|
1010 |
+
str +='<a href="#" id="listprevbtn'+option.thecontainer+'" class="listprevbtn '+((option.page==0)?"listbtndisabled":"")+'">'+i18n.dcmvcal.prev+'</a>';
|
1011 |
+
str +='<a href="#" id="listnextbtn'+option.thecontainer+'" class="listnextbtn '+( (events.length-1==eMax)?"listbtndisabled":"")+'">'+i18n.dcmvcal.next+'</a>';
|
1012 |
+
}
|
1013 |
+
str +='<div style="clear:both"></div></div>';
|
1014 |
+
}
|
1015 |
+
if (str!="")
|
1016 |
+
option.cachepages[option.page] = str;
|
1017 |
+
html.push(str);
|
1018 |
+
}
|
1019 |
+
html.push("</div>");
|
1020 |
+
|
1021 |
+
option.datestrshow = " ";
|
1022 |
+
gridcontainer.html(html.join(""));
|
1023 |
+
$("#listprevbtn"+option.thecontainer).click(function(){
|
1024 |
+
if (!$(this).hasClass("listbtndisabled"))
|
1025 |
+
$("#gridcontainer"+option.thecontainer).previousRange().BcalGetOp();
|
1026 |
+
return false;
|
1027 |
+
})
|
1028 |
+
$("#listnextbtn"+option.thecontainer).click(function(){
|
1029 |
+
if (!$(this).hasClass("listbtndisabled"))
|
1030 |
+
$("#gridcontainer"+option.thecontainer).nextRange().BcalGetOp();
|
1031 |
+
return false;
|
1032 |
+
})
|
1033 |
+
$("#listcontainer"+option.thecontainer).find(".list_event_date").each(function(){
|
1034 |
+
if ($(this).attr("option")!="11" && $(this).attr("option")!="22" && $(this).attr("option")!="33" && $(this).attr("option")!="44")
|
1035 |
+
$(this).css("display","none");
|
1036 |
+
})
|
1037 |
+
$("#listcontainer"+option.thecontainer).find(".readmore").click(function(){
|
1038 |
+
if ($(this).parent().parent().attr("readmore_url")=="")
|
1039 |
+
{
|
1040 |
+
if ($(this).hasClass("short"))
|
1041 |
+
{
|
1042 |
+
$(this).parent().parent().find(".description_short").css("display","none");
|
1043 |
+
$(this).parent().parent().find(".description_large").css("display","block");
|
1044 |
+
}
|
1045 |
+
else
|
1046 |
+
{
|
1047 |
+
$(this).parent().parent().find(".description_short").css("display","block");
|
1048 |
+
$(this).parent().parent().find(".description_large").css("display","none");
|
1049 |
+
}
|
1050 |
+
}
|
1051 |
+
else
|
1052 |
+
{
|
1053 |
+
document.location = $(this).parent().parent().attr("readmore_url");
|
1054 |
+
}
|
1055 |
+
return false;
|
1056 |
+
})
|
1057 |
+
|
1058 |
+
html = null;
|
1059 |
+
}
|
1060 |
+
//build day view
|
1061 |
+
function BuildDaysAndWeekView(startday, l, events, config) {
|
1062 |
+
var days = [];
|
1063 |
+
if (l == 1) {
|
1064 |
+
var show = dateFormat.call(startday, i18n.dcmvcal.dateformat.Md);
|
1065 |
+
days.push({ display: show, date: startday, day: startday.getDate(), year: startday.getFullYear(), month: startday.getMonth() + 1 });
|
1066 |
+
option.datestrshow = CalDateShow(days[0].date);
|
1067 |
+
option.vstart = days[0].date;
|
1068 |
+
option.vend = days[0].date;
|
1069 |
+
}
|
1070 |
+
else {
|
1071 |
+
var w = 0;
|
1072 |
+
if (l == 7) {
|
1073 |
+
w = config.weekstartday - startday.getDay();
|
1074 |
+
if (w > 0) w = w - l;
|
1075 |
+
var formatdate = i18n.dcmvcal.dateformat.Md;
|
1076 |
+
}
|
1077 |
+
else
|
1078 |
+
var formatdate = i18n.dcmvcal.dateformat.nDaysView;
|
1079 |
+
var ndate;
|
1080 |
+
for (var i = w, j = 0; j < l; i = i + 1, j++) {
|
1081 |
+
ndate = DateAdd("d", i, startday);
|
1082 |
+
var show = dateFormat.call(ndate, formatdate);
|
1083 |
+
days.push({ display: show, date: ndate, day: ndate.getDate(), year: ndate.getFullYear(), month: ndate.getMonth() + 1 });
|
1084 |
+
}
|
1085 |
+
option.vstart = days[0].date;
|
1086 |
+
option.vend = days[l - 1].date;
|
1087 |
+
option.datestrshow = CalDateShow(days[0].date, days[l - 1].date);
|
1088 |
+
}
|
1089 |
+
|
1090 |
+
var allDayEvents = [];
|
1091 |
+
var scollDayEvents = [];
|
1092 |
+
|
1093 |
+
|
1094 |
+
var html = [];
|
1095 |
+
html.push("<div id=\"dvwkcontaienr"+config.thecontainer+"\" class=\"wktopcontainer\">");
|
1096 |
+
html.push("<table class=\"wk-top\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" >");
|
1097 |
+
if (option.columnsList!="" && option.view=="day") //draw columns
|
1098 |
+
{
|
1099 |
+
html.push("<tr><th width=\"60\" class=\"wk-dayWithColumns\">"+days[0].display+"</th>");
|
1100 |
+
for (var i=0;i<option.columnsList.length;i++)
|
1101 |
+
{
|
1102 |
+
html.push("<th abbr='", dateFormat.call(days[0].date, "M/d/yyyy"), "' class='gcweekname' scope=\"col\"><div title='", "' ", " class='wk-dayname'><span class='", "'>", option.columnsList[i], "</span></div></th>");
|
1103 |
+
}
|
1104 |
+
|
1105 |
+
html.push("<th width=\"16\" > </th></tr>");
|
1106 |
+
|
1107 |
+
}
|
1108 |
+
else if (option.rowsList=="" || (option.dayWithTime && option.view=="day"))
|
1109 |
+
{
|
1110 |
+
html.push("<tr><th width=\"60\" rowspan=\"2\"> </th>");
|
1111 |
+
BuildWTHeader(html, days);
|
1112 |
+
html.push("<th width=\"16\" rowspan=\"2\"> </th></tr>");
|
1113 |
+
}
|
1114 |
+
else ////draw rows
|
1115 |
+
{
|
1116 |
+
html.push("<tr><th width=\"60\"> </th>");
|
1117 |
+
BuildWTHeader(html, days);
|
1118 |
+
html.push("<th width=\"16\"> </th></tr>");
|
1119 |
+
}
|
1120 |
+
if (option.rowsList=="" || (option.dayWithTime && option.view=="day"))
|
1121 |
+
{
|
1122 |
+
var dM = PropareEvents(days, events, allDayEvents, scollDayEvents,"");
|
1123 |
+
if (option.columnsList!="" && option.view=="day") //draw columns
|
1124 |
+
{
|
1125 |
+
html.push("<tr><th width=\"60\" > </th>");
|
1126 |
+
BuildWTBodyDayWithCol(html, days, allDayEvents, dM,config,0);
|
1127 |
+
}
|
1128 |
+
else
|
1129 |
+
{
|
1130 |
+
html.push("<tr>");
|
1131 |
+
BuildWTBody(html, days, allDayEvents, dM,config,"");
|
1132 |
+
}
|
1133 |
+
}
|
1134 |
+
else ////draw rows
|
1135 |
+
{
|
1136 |
+
var dayarrs = days;
|
1137 |
+
for (var ii=0;ii<option.rowsList.length;ii++)
|
1138 |
+
{
|
1139 |
+
html.push("<tr><th width=\"60\" class=\"wk-alldayList\">"+option.rowsList[ii]+"</th>");
|
1140 |
+
var dM = PropareEvents(days, events, allDayEvents, scollDayEvents,option.rowsList[ii],"");
|
1141 |
+
var dMax = dM;
|
1142 |
+
var sufix = ii;
|
1143 |
+
|
1144 |
+
if (option.columnsList!="" && option.view=="day") //draw columns
|
1145 |
+
{
|
1146 |
+
BuildWTBodyDayWithCol(html, days, allDayEvents, dM,config,ii);
|
1147 |
+
|
1148 |
+
}
|
1149 |
+
else
|
1150 |
+
{
|
1151 |
+
BuildWTBody(html, days, allDayEvents, dM,config,ii,"");
|
1152 |
+
}
|
1153 |
+
}
|
1154 |
+
|
1155 |
+
|
1156 |
+
|
1157 |
+
}
|
1158 |
+
html.push("</table>");
|
1159 |
+
html.push("</div>");
|
1160 |
+
|
1161 |
+
if (option.rowsList=="" || (option.dayWithTime && option.view=="day"))
|
1162 |
+
{
|
1163 |
+
html.push("<div id=\"dvtec"+config.thecontainer+"\" class=\"scolltimeevent\"><table style=\"table-layout: fixed;", $.browser.msie ? "" : "width:100%", "\" cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td>");
|
1164 |
+
html.push("<table style=\"height: "+((option.hoursEnd-option.hoursStart+1)*option.cellheight)+"px\" id=\"tgTable"+config.thecontainer+"\" class=\"tg-timedevents\" cellspacing=\"0\" cellpadding=\"0\"><tbody>");
|
1165 |
+
BuildDayScollEventheader(html, days, scollDayEvents,config);
|
1166 |
+
if (option.columnsList!="" && option.view=="day") //draw columns
|
1167 |
+
BuildDayScollEventbodyWithCol(html, days, scollDayEvents,config);
|
1168 |
+
else
|
1169 |
+
BuildDayScollEventbody(html, days, scollDayEvents,config);
|
1170 |
+
html.push("</tbody></table></td></tr></tbody></table></div>");
|
1171 |
+
}
|
1172 |
+
gridcontainer.html(html.join(""));
|
1173 |
+
html = null;
|
1174 |
+
}
|
1175 |
+
//build month view
|
1176 |
+
function BuildMonthView(showday, events, config) {
|
1177 |
+
var cc = "<div id='cal-month-cc"+config.thecontainer+"' class='cc'><div id='cal-month-cc-header"+config.thecontainer+"'><div class='cc-close' id='cal-month-closebtn"+config.thecontainer+"'></div><div id='cal-month-cc-title"+config.thecontainer+"' class='cc-title'></div></div><div id='cal-month-cc-body"+config.thecontainer+"' class='cc-body'><div id='cal-month-cc-content"+config.thecontainer+"' class='st-contents'><table class='st-grid' cellSpacing='0' cellPadding='0'><tbody></tbody></table></div></div></div>";
|
1178 |
+
var html = [];
|
1179 |
+
html.push(cc);
|
1180 |
+
//build header
|
1181 |
+
html.push("<div id=\"mvcontainer"+config.thecontainer+"\" class=\"mv-container\">");
|
1182 |
+
html.push("<table id=\"mvweek"+config.thecontainer+"\" class=\"mv-daynames-table\" cellSpacing=\"0\" cellPadding=\"0\"><tbody><tr>");
|
1183 |
+
for (var i = config.weekstartday, j = 0; j < 7; i++, j++) {
|
1184 |
+
if (i > 6) i = 0;
|
1185 |
+
var p = { dayname: __WDAY[i] };
|
1186 |
+
if (__VIEWWEEKDAYS[i]!=0)
|
1187 |
+
html.push("<th class=\"mv-dayname\" title=\"", __WDAY[i], "\">", __WDAY[i], "");
|
1188 |
+
}
|
1189 |
+
html.push("</tr></tbody></table>");
|
1190 |
+
html.push("</div>");
|
1191 |
+
var bH = GetMonthViewBodyHeight() - GetMonthViewHeaderHeight();
|
1192 |
+
|
1193 |
+
html.push("<div id=\"mvEventContainer"+config.thecontainer+"\" class=\"mv-event-container\" style=\"top:18px;height:", bH, "px;", "\">");
|
1194 |
+
BuilderMonthBody(html, showday, config.weekstartday, events, bH,config);
|
1195 |
+
html.push("</div>");
|
1196 |
+
gridcontainer.html(html.join(""));
|
1197 |
+
html = null;
|
1198 |
+
$("#cal-month-closebtn"+config.thecontainer).click(closeCc);
|
1199 |
+
}
|
1200 |
+
function closeCc() {
|
1201 |
+
$("#cal-month-cc"+option.thecontainer).css("visibility", "hidden");
|
1202 |
+
}
|
1203 |
+
|
1204 |
+
//all-day event, including more-than-one-day events
|
1205 |
+
function PropareEvents(dayarrs, events, aDE, sDE,filter) {
|
1206 |
+
var l = dayarrs.length;
|
1207 |
+
var el = events.length;
|
1208 |
+
var fE = [];
|
1209 |
+
var deB = aDE;
|
1210 |
+
var deA = sDE;
|
1211 |
+
var startRange = dayarrs[0].date;
|
1212 |
+
var endRange = dayarrs[dayarrs.length-1].date;
|
1213 |
+
endRange = new Date(endRange.getFullYear(),endRange.getMonth(),endRange.getDate(),23,59,59);
|
1214 |
+
for (var j = 0; j < el; j++) {
|
1215 |
+
var sD = events[j][2];
|
1216 |
+
var eD = events[j][3];
|
1217 |
+
|
1218 |
+
var diff = DateDiff("d", sD, eD);
|
1219 |
+
if (diff > 0 && !(events[j][4] == 1)) {
|
1220 |
+
if (sD < startRange) { //start date out of range
|
1221 |
+
sD = startRange;
|
1222 |
+
}
|
1223 |
+
if (eD > endRange) { //end date out of range
|
1224 |
+
eD = endRange;
|
1225 |
+
}
|
1226 |
+
var stmp = sD;
|
1227 |
+
for (sD;sD<=eD;sD = DateAdd("d", 1, sD))
|
1228 |
+
{
|
1229 |
+
var s = {};
|
1230 |
+
s.event = events[j];
|
1231 |
+
s.day = sD.getDate();
|
1232 |
+
s.year = sD.getFullYear();
|
1233 |
+
s.month = sD.getMonth() + 1;
|
1234 |
+
if (option.rowsList=="" || (option.dayWithTime && option.view=="day"))
|
1235 |
+
s.allday = events[j][4] == 1;
|
1236 |
+
else
|
1237 |
+
s.allday = 1;
|
1238 |
+
s.crossday = events[j][5] == 1;
|
1239 |
+
s.reevent = events[j][6];// == 1; //Recurring event
|
1240 |
+
s.daystr = [s.year, s.month, s.day].join("/");
|
1241 |
+
s.noResizer = true;
|
1242 |
+
|
1243 |
+
s.st = {};
|
1244 |
+
if (sD>events[j][2])
|
1245 |
+
{
|
1246 |
+
s.st.hour = 0;
|
1247 |
+
s.st.minute = 0;
|
1248 |
+
s.noStarttime = true;
|
1249 |
+
}
|
1250 |
+
else
|
1251 |
+
{
|
1252 |
+
s.st.hour = sD.getHours();
|
1253 |
+
s.st.minute = sD.getMinutes();
|
1254 |
+
}
|
1255 |
+
s.st.p = s.st.hour * 60 + s.st.minute; // start time
|
1256 |
+
s.et = {};
|
1257 |
+
if (DateAdd("d", 1, sD)<events[j][3])
|
1258 |
+
{
|
1259 |
+
s.et.hour = 23;
|
1260 |
+
s.et.minute = 59;
|
1261 |
+
}
|
1262 |
+
else
|
1263 |
+
{
|
1264 |
+
s.et.hour = eD.getHours();
|
1265 |
+
s.et.minute = eD.getMinutes();
|
1266 |
+
}
|
1267 |
+
s.et.p = s.et.hour * 60 + s.et.minute; // end time
|
1268 |
+
//if (s.allday || ( (s.st.hour>=option.hoursStart) && (s.st.hour<=option.hoursEnd) ))
|
1269 |
+
//if ( filter=="" || (filter!="" && ((option.rowsByCategory=="dc_locations" && events[j][9]==filter) || (option.rowsByCategory=="dc_subjects" && events[j][1]==filter)) ) )
|
1270 |
+
fE.push(s);
|
1271 |
+
}
|
1272 |
+
}
|
1273 |
+
else
|
1274 |
+
{
|
1275 |
+
var s = {};
|
1276 |
+
s.event = events[j];
|
1277 |
+
s.day = sD.getDate();
|
1278 |
+
s.year = sD.getFullYear();
|
1279 |
+
s.month = sD.getMonth() + 1;
|
1280 |
+
if (option.rowsList=="" || (option.dayWithTime && option.view=="day"))
|
1281 |
+
s.allday = events[j][4] == 1;
|
1282 |
+
else
|
1283 |
+
s.allday = 1;
|
1284 |
+
s.crossday = events[j][5] == 1;
|
1285 |
+
s.reevent = events[j][6];// == 1; //Recurring event
|
1286 |
+
s.daystr = [s.year, s.month, s.day].join("/");
|
1287 |
+
s.st = {};
|
1288 |
+
s.st.hour = sD.getHours();
|
1289 |
+
s.st.minute = sD.getMinutes();
|
1290 |
+
s.st.p = s.st.hour * 60 + s.st.minute; // start time
|
1291 |
+
s.et = {};
|
1292 |
+
s.et.hour = eD.getHours();
|
1293 |
+
s.et.minute = eD.getMinutes();
|
1294 |
+
s.et.p = s.et.hour * 60 + s.et.minute; // end time
|
1295 |
+
if (s.allday || ( (s.st.hour>=option.hoursStart) && (s.st.hour<=option.hoursEnd) ))
|
1296 |
+
if ( filter=="" || (filter!="" && ((option.rowsByCategory=="dc_locations" && events[j][9]==filter) || (option.rowsByCategory=="dc_subjects" && events[j][1]==filter)) ) )
|
1297 |
+
fE.push(s);
|
1298 |
+
}
|
1299 |
+
}
|
1300 |
+
var dMax = 0;
|
1301 |
+
for (var i = 0; i < l; i++) {
|
1302 |
+
var da = dayarrs[i];
|
1303 |
+
deA[i] = []; deB[i] = [];
|
1304 |
+
da.daystr = da.year + "/" + da.month + "/" + da.day;
|
1305 |
+
for (var j = 0; j < fE.length; j++) {
|
1306 |
+
if (!fE[j].crossday && !fE[j].allday) {
|
1307 |
+
if (da.daystr == fE[j].daystr)
|
1308 |
+
deA[i].push(fE[j]);
|
1309 |
+
}
|
1310 |
+
else {
|
1311 |
+
if (da.daystr == fE[j].daystr) {
|
1312 |
+
deB[i].push(fE[j]);
|
1313 |
+
dMax++;
|
1314 |
+
}
|
1315 |
+
else {
|
1316 |
+
if (i == 0 && da.date >= fE[j].event[2] && da.date <= fE[j].event[3])//first more-than-one-day event
|
1317 |
+
{
|
1318 |
+
deB[i].push(fE[j]);
|
1319 |
+
dMax++;
|
1320 |
+
}
|
1321 |
+
}
|
1322 |
+
}
|
1323 |
+
}
|
1324 |
+
}
|
1325 |
+
var lrdate = dayarrs[l - 1].date;
|
1326 |
+
for (var i = 0; i < l; i++) { //to deal with more-than-one-day event
|
1327 |
+
var de = deB[i];
|
1328 |
+
if (de.length > 0) { //
|
1329 |
+
for (var j = 0; j < de.length; j++) {
|
1330 |
+
var end = DateDiff("d", lrdate, de[j].event[3]) > 0 ? lrdate : de[j].event[3];
|
1331 |
+
|
1332 |
+
|
1333 |
+
de[j].colSpan = 0;
|
1334 |
+
for (var x=dayarrs[i].date;x<=end;x=DateAdd("d", 1, x))
|
1335 |
+
de[j].colSpan += __VIEWWEEKDAYS[x.getDay()];
|
1336 |
+
|
1337 |
+
//de[j].colSpan = DateDiff("d", dayarrs[i].date, end) + 1;
|
1338 |
+
}
|
1339 |
+
}
|
1340 |
+
de = null;
|
1341 |
+
}
|
1342 |
+
//for all-day events
|
1343 |
+
for (var i = 0; i < l; i++) {
|
1344 |
+
var de = deA[i];
|
1345 |
+
if (de.length > 0) {
|
1346 |
+
var x = [];
|
1347 |
+
var y = [];
|
1348 |
+
var D = [];
|
1349 |
+
var dl = de.length;
|
1350 |
+
var Ia;
|
1351 |
+
for (var j = 0; j < dl; ++j) {
|
1352 |
+
var ge = de[j];
|
1353 |
+
for (var La = ge.st.p, Ia = 0; y[Ia] > La; ) Ia++;
|
1354 |
+
ge.PO = Ia; ge.ne = []; //PO is how many events before this one
|
1355 |
+
y[Ia] = ge.et.p || 1440;
|
1356 |
+
x[Ia] = ge;
|
1357 |
+
if (!D[Ia]) {
|
1358 |
+
D[Ia] = [];
|
1359 |
+
}
|
1360 |
+
D[Ia].push(ge);
|
1361 |
+
if (Ia != 0) {
|
1362 |
+
ge.pe = [x[Ia - 1]]; //previous event
|
1363 |
+
x[Ia - 1].ne.push(ge); //next event
|
1364 |
+
}
|
1365 |
+
for (Ia = Ia + 1; y[Ia] <= La; ) Ia++;
|
1366 |
+
if (x[Ia]) {
|
1367 |
+
var k = x[Ia];
|
1368 |
+
ge.ne.push(k);
|
1369 |
+
k.pe.push(ge);
|
1370 |
+
}
|
1371 |
+
ge.width = 1 / (ge.PO + 1);
|
1372 |
+
ge.left = 1 - ge.width;
|
1373 |
+
}
|
1374 |
+
var k = Array.prototype.concat.apply([], D);
|
1375 |
+
x = y = D = null;
|
1376 |
+
var t = k.length;
|
1377 |
+
for (var y = t; y--; ) {
|
1378 |
+
var H = 1;
|
1379 |
+
var La = 0;
|
1380 |
+
var x = k[y];
|
1381 |
+
for (var D = x.ne.length; D--; ) {
|
1382 |
+
var Ia = x.ne[D];
|
1383 |
+
La = Math.max(La, Ia.VL);
|
1384 |
+
H = Math.min(H, Ia.left)
|
1385 |
+
}
|
1386 |
+
x.VL = La + 1;
|
1387 |
+
x.width = H / (x.PO + 1);
|
1388 |
+
x.left = H - x.width;
|
1389 |
+
}
|
1390 |
+
for (var y = 0; y < t; y++) {
|
1391 |
+
var x = k[y];
|
1392 |
+
x.left = 0;
|
1393 |
+
if (x.pe) for (var D = x.pe.length; D--; ) {
|
1394 |
+
var H = x.pe[D];
|
1395 |
+
x.left = Math.max(x.left, H.left + H.width);
|
1396 |
+
}
|
1397 |
+
var p = (1 - x.left) / x.VL;
|
1398 |
+
x.width = Math.max(x.width, p);
|
1399 |
+
x.aQ = Math.min(1 - x.left, x.width + 0.7 * p); //width offset
|
1400 |
+
}
|
1401 |
+
de = null;
|
1402 |
+
deA[i] = k;
|
1403 |
+
}
|
1404 |
+
}
|
1405 |
+
return dMax;
|
1406 |
+
}
|
1407 |
+
function BuildWTHeader(ht, dayarrs) {
|
1408 |
+
//1:
|
1409 |
+
//ht.push("<tr>", "<th width=\"60\" rowspan=\"3\"> </th>");
|
1410 |
+
for (var i = 0; i < dayarrs.length; i++) {
|
1411 |
+
var ev, title, cl;
|
1412 |
+
if (dayarrs.length == 1) {
|
1413 |
+
ev = "";
|
1414 |
+
title = "";
|
1415 |
+
cl = "";
|
1416 |
+
}
|
1417 |
+
else {
|
1418 |
+
ev = ""; // "onclick=\"javascript:FunProxy('week2day',event,this);\"";
|
1419 |
+
title = i18n.dcmvcal.to_date_view;
|
1420 |
+
cl = "wk-daylink";
|
1421 |
+
}
|
1422 |
+
if (dayarrs.length == 1 || __VIEWWEEKDAYS[dayarrs[i].date.getDay()])
|
1423 |
+
ht.push("<th abbr='", dateFormat.call(dayarrs[i].date, "M/d/yyyy"), "' class='gcweekname' scope=\"col\"><div title='", title, "' ", ev, " class='wk-dayname'><span class='", cl, "'>", dayarrs[i].display, "</span></div></th>");
|
1424 |
+
|
1425 |
+
}
|
1426 |
+
//ht.push("<th width=\"16\" rowspan=\"3\"> </th>");
|
1427 |
+
//ht.push("</tr>"); //end tr1;
|
1428 |
+
}
|
1429 |
+
function BuildWTBodyDayWithCol(ht, dayarrs, events, dMax,config,sufix) {
|
1430 |
+
var xx = sufix;
|
1431 |
+
ht.push("<td colspan=\""+option.columnsList.length+"\" class=\"wk-allday\"");
|
1432 |
+
ht.push("><div id=\"weekViewAllDaywk"+config.thecontainer+sufix+"\"><table class=\"st-grid\" height=\"100%\" cellpadding=\"0\" cellspacing=\"0\" ><tbody>");
|
1433 |
+
sufix = ' row="'+sufix+'"';
|
1434 |
+
|
1435 |
+
if (dMax == 0) {
|
1436 |
+
ht.push("<tr class=\"wk-allday-last\">");
|
1437 |
+
for (var i=0;i<option.columnsList.length;i++)
|
1438 |
+
ht.push("<td class=\"st-c st-s\"", " ch='qkadd' abbr='", dateFormat.call(dayarrs[0].date, "yyyy-M-d"), "' axis='00:00'> </td>");
|
1439 |
+
ht.push("</tr>");
|
1440 |
+
}
|
1441 |
+
else {
|
1442 |
+
var l = events.length;
|
1443 |
+
var el = 0;
|
1444 |
+
var x = [];
|
1445 |
+
for (var j = 0; j < l; j++) {
|
1446 |
+
x.push(0);
|
1447 |
+
}
|
1448 |
+
var ev = new Array();
|
1449 |
+
var evlength = 0;
|
1450 |
+
|
1451 |
+
for (var j = 0; ((el < dMax) && (j < dMax)); j++) {
|
1452 |
+
for (var h = 0; h < l; ) {
|
1453 |
+
var e = events[h][x[h]];
|
1454 |
+
for (var ii=0;ii<option.columnsList.length;ii++)
|
1455 |
+
{
|
1456 |
+
if (e) { //if exists
|
1457 |
+
if ( ((option.dayWithColumns=="dc_locations" && e.event[9]==option.columnsList[ii]) || (option.dayWithColumns=="dc_subjects" && e.event[1]==option.columnsList[ii])) )
|
1458 |
+
{
|
1459 |
+
x[h] = x[h] + 1;
|
1460 |
+
var t = BuildMonthDayEvent(e, dayarrs[h].date, l - h);
|
1461 |
+
if (!ev[ii]) ev[ii] = new Array();
|
1462 |
+
ev[ii][ev[ii].length] = "<td class='st-c' ch='show'>"+ t + "</td>";;
|
1463 |
+
if (ev[ii].length > evlength)
|
1464 |
+
evlength = ev[ii].length;
|
1465 |
+
el++;
|
1466 |
+
}
|
1467 |
+
}
|
1468 |
+
|
1469 |
+
}
|
1470 |
+
h++;
|
1471 |
+
}
|
1472 |
+
}
|
1473 |
+
for (var j = 0; j < evlength; j++)
|
1474 |
+
{
|
1475 |
+
ht.push("<tr>");
|
1476 |
+
for (var ii=0;ii<option.columnsList.length;ii++)
|
1477 |
+
if (ev[ii] && ev[ii][j])
|
1478 |
+
ht.push(ev[ii][j]);
|
1479 |
+
else
|
1480 |
+
ht.push("<td class='st-c' ch='show'> </td>");
|
1481 |
+
ht.push("<tr>");
|
1482 |
+
|
1483 |
+
}
|
1484 |
+
ht.push("<tr height=\"100%\" class=\"wk-allday-last\">");
|
1485 |
+
for (var ii=0;ii<option.columnsList.length;ii++)
|
1486 |
+
for (var h = 0; h < l; h++) {
|
1487 |
+
ht.push("<td height=\"100%\" class='st-c st-s' ch='qkadd' abbr='", dateFormat.call(dayarrs[h].date, "M/d/yyyy"), "' axis='00:00'> </td>");
|
1488 |
+
}
|
1489 |
+
ht.push("</tr>");
|
1490 |
+
}
|
1491 |
+
ht.push("</tbody></table></div></td></tr>"); // stgrid end //wvAd end //td2 end //tr2 end
|
1492 |
+
//3:
|
1493 |
+
ht.push("<tr>");
|
1494 |
+
ht.push("<td style=\"height: 5px;\"");
|
1495 |
+
if (dayarrs.length > 1) {
|
1496 |
+
if (option.view == "week")
|
1497 |
+
ht.push(" colSpan='",__VIEWWEEKDAYSTOTAL+2, "'");
|
1498 |
+
else
|
1499 |
+
ht.push(" colSpan='",option.numberOfDays+2, "'");
|
1500 |
+
}
|
1501 |
+
ht.push("></td>");
|
1502 |
+
ht.push("</tr>");
|
1503 |
+
}
|
1504 |
+
function BuildWTBody(ht, dayarrs, events, dMax,config,sufix) {
|
1505 |
+
//2:
|
1506 |
+
var sufixIndex = sufix;
|
1507 |
+
ht.push("<td class=\"wk-allday\"");
|
1508 |
+
if (dayarrs.length > 1) {
|
1509 |
+
if (option.view == "week")
|
1510 |
+
ht.push(" colSpan='",__VIEWWEEKDAYSTOTAL, "'"); //dayarrs.length
|
1511 |
+
else
|
1512 |
+
ht.push(" colSpan='",option.numberOfDays, "'"); //dayarrs.length
|
1513 |
+
}
|
1514 |
+
//onclick=\"javascript:FunProxy('rowhandler',event,this);\"
|
1515 |
+
ht.push("><div id=\"weekViewAllDaywk"+config.thecontainer+sufix+"\"><table class=\"st-grid\" height=\"100%\" cellpadding=\"0\" cellspacing=\"0\" ><tbody>");
|
1516 |
+
sufix = ' row="'+sufix+'"';
|
1517 |
+
if (dMax == 0) {
|
1518 |
+
ht.push("<tr class=\"wk-allday-last\">");
|
1519 |
+
for (var i = 0; i < dayarrs.length; i++) {
|
1520 |
+
if (__VIEWWEEKDAYS[i]!=0)
|
1521 |
+
|
1522 |
+
ht.push("<td class=\"st-c st-s\"", " ch='qkadd' abbr='", dateFormat.call(dayarrs[i].date, "yyyy-M-d"), "' axis='00:00'> </td>");
|
1523 |
+
|
1524 |
+
}
|
1525 |
+
ht.push("</tr>");
|
1526 |
+
}
|
1527 |
+
else {
|
1528 |
+
var l = events.length;
|
1529 |
+
var el = 0;
|
1530 |
+
var x = [];
|
1531 |
+
for (var j = 0; j < l; j++) {
|
1532 |
+
x.push(0);
|
1533 |
+
}
|
1534 |
+
//var c = tc();
|
1535 |
+
var rowsByCategoryArray = new Array();
|
1536 |
+
for (var j = 0; ((el < dMax) && (j < dMax)); j++) {
|
1537 |
+
ht.push("<tr>");
|
1538 |
+
for (var h = 0; h < l; ) {
|
1539 |
+
var e = events[h][x[h]];
|
1540 |
+
var tmp_h = h;
|
1541 |
+
if (__VIEWWEEKDAYS[((dayarrs[tmp_h].date.getDay())%option.numberOfDays)]!=0) ht.push("<td class='st-c");
|
1542 |
+
if ((e) && ( (option.rowsByCategory=="") || ( (option.rowsByCategory=="dc_locations" && e.event[9]==option.rowsList[sufixIndex] && ($.inArray( e.event[0], rowsByCategoryArray)==-1 || e.event[6]!="") ) || (option.rowsByCategory=="dc_subjects" && e.event[1]==option.rowsList[sufixIndex] && ($.inArray( e.event[0], rowsByCategoryArray)==-1 || e.event[6]!="") ) ) ))
|
1543 |
+
{
|
1544 |
+
rowsByCategoryArray[rowsByCategoryArray.length]=e.event[0];
|
1545 |
+
x[h] = x[h] + 1;
|
1546 |
+
if (__VIEWWEEKDAYS[((dayarrs[tmp_h].date.getDay())%option.numberOfDays)]!=0) ht.push("'");
|
1547 |
+
|
1548 |
+
var t = BuildMonthDayEvent(e, dayarrs[h].date, l - h);
|
1549 |
+
if (sufix!="")
|
1550 |
+
t = t.replace('class="rb-o', sufix+' class="rb-o');
|
1551 |
+
if (e.colSpan > 1) {
|
1552 |
+
if (__VIEWWEEKDAYS[((dayarrs[tmp_h].date.getDay())%option.numberOfDays)]!=0) ht.push(" colSpan='", e.colSpan, "'");
|
1553 |
+
|
1554 |
+
var zz = 0;
|
1555 |
+
for (var p=0; (p<e.colSpan) && (h+zz < option.numberOfDays);)
|
1556 |
+
{
|
1557 |
+
p += __VIEWWEEKDAYS[dayarrs[h+zz].date.getDay()];
|
1558 |
+
zz++;
|
1559 |
+
}
|
1560 |
+
|
1561 |
+
h += zz;
|
1562 |
+
}
|
1563 |
+
else {
|
1564 |
+
h++;
|
1565 |
+
}
|
1566 |
+
if (__VIEWWEEKDAYS[((dayarrs[tmp_h].date.getDay())%option.numberOfDays)]!=0) ht.push(" ch='show'>", t);
|
1567 |
+
t = null;
|
1568 |
+
el++;
|
1569 |
+
}
|
1570 |
+
else {
|
1571 |
+
if (__VIEWWEEKDAYS[((dayarrs[tmp_h].date.getDay())%option.numberOfDays)]!=0) ht.push(" st-s' ch='qkadd' abbr='", dateFormat.call(dayarrs[h].date, "M/d/yyyy"), "' axis='00:00'> ");
|
1572 |
+
h++;
|
1573 |
+
}
|
1574 |
+
if (__VIEWWEEKDAYS[((dayarrs[tmp_h].date.getDay())%option.numberOfDays)]!=0) ht.push("</td>");
|
1575 |
+
}
|
1576 |
+
ht.push("</tr>");
|
1577 |
+
}
|
1578 |
+
ht.push("<tr height=\"100%\" class=\"wk-allday-last\">");
|
1579 |
+
for (var h = 0; h < l; h++) {
|
1580 |
+
if (__VIEWWEEKDAYS[((dayarrs[h].date.getDay())%option.numberOfDays)]!=0)
|
1581 |
+
ht.push("<td height=\"100%\" class='st-c st-s' ch='qkadd' abbr='", dateFormat.call(dayarrs[h].date, "M/d/yyyy"), "' axis='00:00'> </td>");
|
1582 |
+
}
|
1583 |
+
ht.push("</tr>");
|
1584 |
+
}
|
1585 |
+
ht.push("</tbody></table></div></td></tr>"); // stgrid end //wvAd end //td2 end //tr2 end
|
1586 |
+
//3:
|
1587 |
+
ht.push("<tr>");
|
1588 |
+
ht.push("<td style=\"height: 5px;\"");
|
1589 |
+
if (dayarrs.length > 1) {
|
1590 |
+
if (option.view == "week")
|
1591 |
+
ht.push(" colSpan='",__VIEWWEEKDAYSTOTAL+2, "'");
|
1592 |
+
else
|
1593 |
+
ht.push(" colSpan='",option.numberOfDays+2, "'");
|
1594 |
+
}
|
1595 |
+
ht.push("></td>");
|
1596 |
+
ht.push("</tr>");
|
1597 |
+
}
|
1598 |
+
|
1599 |
+
function BuildDayScollEventheader(ht, dayarrs, events,config) {
|
1600 |
+
//1:
|
1601 |
+
ht.push("<tr>");
|
1602 |
+
ht.push("<td style='width:60px;'></td>");
|
1603 |
+
ht.push("<td");
|
1604 |
+
if (dayarrs.length > 1) {
|
1605 |
+
if (option.view == "week")
|
1606 |
+
ht.push(" colSpan='",__VIEWWEEKDAYSTOTAL, "'");
|
1607 |
+
else
|
1608 |
+
ht.push(" colSpan='",option.numberOfDays, "'");
|
1609 |
+
}
|
1610 |
+
else if (option.columnsList!="" && option.view=="day")
|
1611 |
+
ht.push(" colSpan='",option.columnsList.length, "'");
|
1612 |
+
|
1613 |
+
ht.push(" ><div id=\"tgspanningwrapper"+config.thecontainer+"\" class=\"tg-spanningwrapper\"><div style=\"font-size: 20px\" class=\"tg-hourmarkers\">");
|
1614 |
+
var hh = (option.cellheight/2) - 1 ;
|
1615 |
+
for (var i = option.hoursStart; i <= option.hoursEnd; i++) {
|
1616 |
+
//for (var i = 0; i < 24; i++) {
|
1617 |
+
ht.push("<div class=\"tg-dualmarker\"style=\"height:"+hh+"px;line-height:"+hh+"px;margin-bottom:"+hh+"px\"></div>");
|
1618 |
+
}
|
1619 |
+
ht.push("</div></div></td></tr>");
|
1620 |
+
|
1621 |
+
//2:
|
1622 |
+
ht.push("<tr>");
|
1623 |
+
ht.push("<td style=\"width: 60px\" class=\"tg-times\">");
|
1624 |
+
|
1625 |
+
//get current time
|
1626 |
+
var now = new Date(); var h = now.getHours(); var m = now.getMinutes();
|
1627 |
+
var mHg = gP(h, m) - 4; //make middle alignment vertically
|
1628 |
+
ht.push("<div id=\"tgnowptr"+config.thecontainer+"\" class=\"tg-nowptr\" style=\"left:0px;top:", mHg, "px\"></div>");
|
1629 |
+
var tmt = "";
|
1630 |
+
for (var i = option.hoursStart; i <= option.hoursEnd; i++) {
|
1631 |
+
tmt = fomartTimeAMPM(i,0,__MilitaryTime);
|
1632 |
+
ht.push("<div style=\"height: "+(option.cellheight-1)+"px\" class=\"tg-time\">", tmt, "</div>");
|
1633 |
+
}
|
1634 |
+
ht.push("</td>");
|
1635 |
+
}
|
1636 |
+
function BuildDayScollEventbody(ht, dayarrs, events,config) {
|
1637 |
+
var now = new Date(); var h = now.getHours(); var m = now.getMinutes();
|
1638 |
+
var mHg = gP(h, m) - 4; //make middle alignment vertically
|
1639 |
+
var l = dayarrs.length;
|
1640 |
+
for (var i = 0; i < l; i++)
|
1641 |
+
{
|
1642 |
+
if (__VIEWWEEKDAYS[dayarrs[i].date.getDay()]!=0)
|
1643 |
+
{
|
1644 |
+
ht.push("<td class=\"tg-col\" ch='qkadd' abbr='", dateFormat.call(dayarrs[i].date, "M/d/yyyy"), "'>");
|
1645 |
+
var istoday = dateFormat.call(dayarrs[i].date, "yyyyMMdd") == dateFormat.call(new Date(), "yyyyMMdd");
|
1646 |
+
// Today
|
1647 |
+
if (istoday) {
|
1648 |
+
ht.push("<div style=\"margin-bottom: -"+((option.hoursEnd-option.hoursStart+1)*option.cellheight)+"px; height:"+((option.hoursEnd-option.hoursStart+1)*option.cellheight)+"px\" class=\"tg-today\"> </div>");
|
1649 |
+
}
|
1650 |
+
//var eventC = $(eventWrap);
|
1651 |
+
//onclick=\"javascript:FunProxy('rowhandler',event,this);\"
|
1652 |
+
ht.push("<div style=\"margin-bottom: -"+((option.hoursEnd-option.hoursStart+1)*option.cellheight)+"px; height: "+((option.hoursEnd-option.hoursStart+1)*option.cellheight)+"px\" id='tgCol"+config.thecontainer+"", i, "' class=\"tg-col-eventwrapper\">");
|
1653 |
+
BuildEvents(ht, events[i], dayarrs[i]);
|
1654 |
+
ht.push("</div>");
|
1655 |
+
|
1656 |
+
ht.push("<div class=\"tg-col-overlaywrapper\" id='tgOver"+config.thecontainer+"", i, "'>");
|
1657 |
+
if (istoday) {
|
1658 |
+
var mhh = mHg + 4;
|
1659 |
+
ht.push("<div id=\"tgnowmarker"+config.thecontainer+"\" class=\"tg-hourmarker tg-nowmarker\" style=\"left:0px;top:", mhh, "px\"></div>");
|
1660 |
+
}
|
1661 |
+
ht.push("</div>");
|
1662 |
+
ht.push("</td>");
|
1663 |
+
}
|
1664 |
+
}
|
1665 |
+
ht.push("</tr>");
|
1666 |
+
}
|
1667 |
+
function BuildDayScollEventbodyWithCol(ht, dayarrs, events,config) {
|
1668 |
+
var i = 0;
|
1669 |
+
//for (var j = 0; j < events[i].length; j++)
|
1670 |
+
// alert(events[i][j].event[1]+"--------"+events[i][j].event[9]);
|
1671 |
+
var now = new Date(); var h = now.getHours(); var m = now.getMinutes();
|
1672 |
+
var mHg = gP(h, m) - 4; //make middle alignment vertically
|
1673 |
+
var l = dayarrs.length;
|
1674 |
+
var i = 0;
|
1675 |
+
{
|
1676 |
+
for (var ii=0;ii<option.columnsList.length;ii++)
|
1677 |
+
{
|
1678 |
+
ht.push("<td class=\"tg-col\" ch='qkadd' col='"+option.columnsList[ii]+"' abbr='", dateFormat.call(dayarrs[i].date, "M/d/yyyy"), "'>");
|
1679 |
+
var istoday = dateFormat.call(dayarrs[i].date, "yyyyMMdd") == dateFormat.call(new Date(), "yyyyMMdd");
|
1680 |
+
// Today
|
1681 |
+
if (istoday) {
|
1682 |
+
ht.push("<div style=\"margin-bottom: -"+((option.hoursEnd-option.hoursStart+1)*option.cellheight)+"px; height:"+((option.hoursEnd-option.hoursStart+1)*option.cellheight)+"px\" class=\"tg-today\"> </div>");
|
1683 |
+
}
|
1684 |
+
ht.push("<div style=\"margin-bottom: -"+((option.hoursEnd-option.hoursStart+1)*option.cellheight)+"px; height: "+((option.hoursEnd-option.hoursStart+1)*option.cellheight)+"px\" id='tgCol"+config.thecontainer+"", i, "' class=\"tg-col-eventwrapper\">");
|
1685 |
+
var eventbyColumns = new Array();
|
1686 |
+
for (var j = 0; j < events[i].length; j++)
|
1687 |
+
{
|
1688 |
+
var e = events[i][j];
|
1689 |
+
e.left = 0;
|
1690 |
+
e.aQ = 1;
|
1691 |
+
//alert(e);
|
1692 |
+
if ( ((option.dayWithColumns=="dc_locations" && e.event[9]==option.columnsList[ii]) || (option.dayWithColumns=="dc_subjects" && e.event[1]==option.columnsList[ii])) )
|
1693 |
+
eventbyColumns[eventbyColumns.length] = e;
|
1694 |
+
|
1695 |
+
}
|
1696 |
+
BuildEvents(ht, eventbyColumns, dayarrs[i]);
|
1697 |
+
ht.push("</div>");
|
1698 |
+
|
1699 |
+
ht.push("<div class=\"tg-col-overlaywrapper\" id='tgOver"+config.thecontainer+"", i, "'>");
|
1700 |
+
if (istoday) {
|
1701 |
+
var mhh = mHg + 4;
|
1702 |
+
ht.push("<div id=\"tgnowmarker"+config.thecontainer+"\" class=\"tg-hourmarker tg-nowmarker\" style=\"left:0px;top:", mhh, "px\"></div>");
|
1703 |
+
}
|
1704 |
+
ht.push("</div>");
|
1705 |
+
ht.push("</td>");
|
1706 |
+
}
|
1707 |
+
}
|
1708 |
+
ht.push("</tr>");
|
1709 |
+
}
|
1710 |
+
|
1711 |
+
//show events to calendar
|
1712 |
+
function BuildEvents(hv, events, sday) {
|
1713 |
+
for (var i = 0; i < events.length; i++) {
|
1714 |
+
var c;
|
1715 |
+
//if (events[i].event[7] && events[i].event[7] >= 0) {
|
1716 |
+
c = tc(events[i].event[7]); //theme
|
1717 |
+
//}
|
1718 |
+
//else {
|
1719 |
+
// c = tc(); //default theme
|
1720 |
+
//}
|
1721 |
+
var tt = BuildDayEvent(c, events[i], i);
|
1722 |
+
|
1723 |
+
hv.push(tt);
|
1724 |
+
}
|
1725 |
+
}
|
1726 |
+
function getTitle(event) {
|
1727 |
+
var timeshow, locationshow, attendsshow, eventshow;
|
1728 |
+
var showtime = event[4] != 1;
|
1729 |
+
eventshow = event[1];
|
1730 |
+
var startformat = getymformat(event[2], null, showtime, true);
|
1731 |
+
var endformat = getymformat(event[3], event[2], showtime, true);
|
1732 |
+
timeshow = dateFormat.call(event[2], startformat) + " - " + dateFormat.call(event[3], endformat);
|
1733 |
+
locationshow = (event[9] != undefined && event[9] != "") ? ($.browser.mozilla?"":"\r\n")+i18n.dcmvcal.location + ":" + event[9] : "";
|
1734 |
+
attendsshow = (event[10] != undefined && event[10] != "") ? event[10] : "";
|
1735 |
+
var ret = [];
|
1736 |
+
if (event[4] == 1) {
|
1737 |
+
ret.push("[" + i18n.dcmvcal.allday_event + "]",$.browser.mozilla?"":"\r\n" );
|
1738 |
+
}
|
1739 |
+
else {
|
1740 |
+
if (event[5] == 1) {
|
1741 |
+
ret.push("[" + i18n.dcmvcal.repeat_event + "]",$.browser.mozilla?"":"\r\n");
|
1742 |
+
}
|
1743 |
+
}
|
1744 |
+
ret.push(i18n.dcmvcal.time + ":", timeshow, $.browser.mozilla?"":"\r\n", i18n.dcmvcal.event + ":", eventshow, locationshow);
|
1745 |
+
if (attendsshow != "") {
|
1746 |
+
ret.push($.browser.mozilla?"":"\r\n", i18n.dcmvcal.participant + ":", attendsshow);
|
1747 |
+
}
|
1748 |
+
return ret.join("");
|
1749 |
+
}
|
1750 |
+
function BuildDayEvent(theme, e, index) {
|
1751 |
+
|
1752 |
+
var p = { bdcolor: theme[0], bgcolor2: theme[0], bgcolor1: theme[2], width: "70%", icon: "", title: "", data: "" };
|
1753 |
+
|
1754 |
+
if (e.noStarttime)
|
1755 |
+
p.starttime = "";
|
1756 |
+
else
|
1757 |
+
p.starttime = fomartTimeAMPM(e.st.hour,e.st.minute,__MilitaryTime);
|
1758 |
+
if (e.noResizer)
|
1759 |
+
p.endtime = "";
|
1760 |
+
else
|
1761 |
+
p.endtime = fomartTimeAMPM(e.et.hour,e.et.minute,__MilitaryTime);
|
1762 |
+
p.content = e.event[1];
|
1763 |
+
p.title = getTitle(e.event);
|
1764 |
+
p.data = e.event.join("$*$");
|
1765 |
+
var icons = [];
|
1766 |
+
icons.push("<I class=\"cic cic-tmr\"> </I>");
|
1767 |
+
if (e.reevent) {
|
1768 |
+
icons.push("<I class=\"cic cic-spcl\"> </I>");
|
1769 |
+
}
|
1770 |
+
p.icon = icons.join("");
|
1771 |
+
var sP = gP(e.st.hour, e.st.minute);
|
1772 |
+
var eP = gP(e.et.hour, e.et.minute);
|
1773 |
+
p.top = sP + "px";
|
1774 |
+
p.left = (e.left * 100) + "%";
|
1775 |
+
p.width = (e.aQ * 100) + "%";
|
1776 |
+
p.height = (eP - sP - 4);
|
1777 |
+
p.i = index;
|
1778 |
+
if (option.enableDrag && (option.readonly != true && (option.userEdit || ((option.userOwner==e.event[12]) && option.userEditOwner ))) && e.event[8] == 1 && !e.noResizer) {
|
1779 |
+
p.drag = "drag";
|
1780 |
+
p.redisplay = "block";
|
1781 |
+
}
|
1782 |
+
else {
|
1783 |
+
p.drag = "";
|
1784 |
+
p.redisplay = "none";
|
1785 |
+
}
|
1786 |
+
p.userEdition = ( ((option.userOwner==e.event[12]) && (option.userEditOwner || option.userDelOwner))?"uEdition":"" );
|
1787 |
+
p.location = (e.event[9]!=null)?e.event[9]:"";
|
1788 |
+
p.description = (e.event[11]!=null)?e.event[11]:"";
|
1789 |
+
var newtemp = Tp(__SCOLLEVENTTEMP, p);
|
1790 |
+
p = null;
|
1791 |
+
return newtemp;
|
1792 |
+
}
|
1793 |
+
|
1794 |
+
//get body height in month view
|
1795 |
+
function GetMonthViewBodyHeight() {
|
1796 |
+
return option.height;
|
1797 |
+
}
|
1798 |
+
function GetMonthViewHeaderHeight() {
|
1799 |
+
return 26;
|
1800 |
+
}
|
1801 |
+
function BuilderMonthBody(htb, showday, startday, events, bodyHeight,config) {
|
1802 |
+
var firstdate = new Date(showday.getFullYear(), showday.getMonth(), 1);
|
1803 |
+
var diffday = startday - firstdate.getDay();
|
1804 |
+
var showmonth = showday.getMonth();
|
1805 |
+
if (diffday > 0) {
|
1806 |
+
diffday -= 7;
|
1807 |
+
}
|
1808 |
+
var startdate = DateAdd("d", diffday, firstdate);
|
1809 |
+
var enddate = DateAdd("d", 34, startdate);
|
1810 |
+
var rc = 5;
|
1811 |
+
|
1812 |
+
if (enddate.getFullYear() == showday.getFullYear() && enddate.getMonth() == showday.getMonth() && enddate.getDate() < __MonthDays[showmonth]) {
|
1813 |
+
enddate = DateAdd("d", 7, enddate);
|
1814 |
+
rc = 6;
|
1815 |
+
}
|
1816 |
+
option.vstart = startdate;
|
1817 |
+
option.vend = enddate;
|
1818 |
+
var themonth = DateAdd("d", 15, startdate);
|
1819 |
+
option.datestrshow = __MonthNameLarge[themonth.getMonth()]+" "+themonth.getFullYear() ;//CalDateShow(startdate, enddate);
|
1820 |
+
bodyHeight = bodyHeight - 18 * rc;
|
1821 |
+
var rowheight = bodyHeight / rc;
|
1822 |
+
var roweventcount = parseInt(rowheight / (option.cellheight/2) /*21*/);
|
1823 |
+
if (rowheight % (option.cellheight/2) /*21*/ > 15) {
|
1824 |
+
roweventcount++;
|
1825 |
+
}
|
1826 |
+
var p = 100 / rc;
|
1827 |
+
var formatevents = [];
|
1828 |
+
var hastdata = formartEventsInHashtable(events, startday, 7, startdate, enddate);
|
1829 |
+
var B = [];
|
1830 |
+
var C = [];
|
1831 |
+
for (var j = 0; j < rc; j++) {
|
1832 |
+
var k = 0;
|
1833 |
+
formatevents[j] = b = [];
|
1834 |
+
for (var i = 0; i < 7; i++) {
|
1835 |
+
var newkeyDate = DateAdd("d", j * 7 + i, startdate);
|
1836 |
+
C[j * 7 + i] = newkeyDate;
|
1837 |
+
var newkey = dateFormat.call(newkeyDate, "MMddyyyy");
|
1838 |
+
b[i] = hastdata[newkey];
|
1839 |
+
if (b[i] && b[i].length > 0) {
|
1840 |
+
k += b[i].length;
|
1841 |
+
}
|
1842 |
+
|
1843 |
+
}
|
1844 |
+
B[j] = k;
|
1845 |
+
}
|
1846 |
+
|
1847 |
+
//var c = tc();
|
1848 |
+
eventDiv.data("mvdata", formatevents);
|
1849 |
+
for (var j = 0; j < rc; j++) {
|
1850 |
+
//onclick=\"javascript:FunProxy('rowhandler',event,this);\"
|
1851 |
+
htb.push("<div id='mvrow"+config.thecontainer+"_", j, "' style=\"HEIGHT:", p, "%; TOP:", p * j, "%\" class=\"month-row\">");
|
1852 |
+
htb.push("<table class=\"st-bg-table\" cellSpacing=\"0\" cellPadding=\"0\"><tbody><tr>");
|
1853 |
+
var dMax = B[j];
|
1854 |
+
|
1855 |
+
for (var i = 0; i < 7; i++) {
|
1856 |
+
var day = C[j * 7 + i];
|
1857 |
+
if (__VIEWWEEKDAYS[i]!=0)
|
1858 |
+
{
|
1859 |
+
htb.push("<td display=\""+__VIEWWEEKDAYS[i]+"\" abbr='", dateFormat.call(day, "M/d/yyyy"), "' ch='qkadd' axis='00:00' title=''");
|
1860 |
+
|
1861 |
+
if (dateFormat.call(day, "yyyyMMdd") == dateFormat.call(new Date(), "yyyyMMdd")) {
|
1862 |
+
htb.push(" class=\"st-bg st-bg-today\">");
|
1863 |
+
}
|
1864 |
+
else {
|
1865 |
+
htb.push(" class=\"st-bg\">");
|
1866 |
+
}
|
1867 |
+
htb.push(" </td>");
|
1868 |
+
}
|
1869 |
+
}
|
1870 |
+
//bgtable
|
1871 |
+
htb.push("</tr></tbody></table>");
|
1872 |
+
|
1873 |
+
//stgrid
|
1874 |
+
htb.push("<table class=\"st-grid\" cellpadding=\"0\" cellspacing=\"0\"><tbody>");
|
1875 |
+
|
1876 |
+
//title tr
|
1877 |
+
htb.push("<tr>");
|
1878 |
+
var titletemp = "<td display=\"${display}\" class=\"st-dtitle${titleClass}\" ch='qkadd' abbr='${abbr}' axis='00:00' title=\"${title}\"><span class='monthdayshow'>${dayshow}</span></a></td>";
|
1879 |
+
|
1880 |
+
for (var i = 0; i < 7; i++) {
|
1881 |
+
var o = { titleClass: "", dayshow: "", display:__VIEWWEEKDAYS[(startday+i)%7]+"i"+i };
|
1882 |
+
var day = C[j * 7 + i];
|
1883 |
+
if (dateFormat.call(day, "yyyyMMdd") == dateFormat.call(new Date(), "yyyyMMdd")) {
|
1884 |
+
o.titleClass = " st-dtitle-today";
|
1885 |
+
}
|
1886 |
+
if (day.getMonth() != showmonth) {
|
1887 |
+
o.titleClass = " st-dtitle-nonmonth";
|
1888 |
+
}
|
1889 |
+
o.title = dateFormat.call(day, i18n.dcmvcal.dateformat.fulldayshow);
|
1890 |
+
if (day.getDate() == 1) {
|
1891 |
+
if (day.getMonth == 0) {
|
1892 |
+
o.dayshow = dateFormat.call(day, i18n.dcmvcal.dateformat.fulldayshow);
|
1893 |
+
}
|
1894 |
+
else {
|
1895 |
+
o.dayshow = dateFormat.call(day, i18n.dcmvcal.dateformat.Md3);
|
1896 |
+
}
|
1897 |
+
}
|
1898 |
+
else {
|
1899 |
+
o.dayshow = day.getDate();
|
1900 |
+
}
|
1901 |
+
o.abbr = dateFormat.call(day, "M/d/yyyy");
|
1902 |
+
if (__VIEWWEEKDAYS[(startday+i)%7]!=0)
|
1903 |
+
htb.push(Tp(titletemp, o));
|
1904 |
+
}
|
1905 |
+
htb.push("</tr>");
|
1906 |
+
var sfirstday = C[j * 7];
|
1907 |
+
BuildMonthRow(htb, formatevents[j], dMax, roweventcount, sfirstday,startday);
|
1908 |
+
//htb=htb.concat(rowHtml); rowHtml = null;
|
1909 |
+
|
1910 |
+
htb.push("</tbody></table>");
|
1911 |
+
//month-row
|
1912 |
+
htb.push("</div>");
|
1913 |
+
}
|
1914 |
+
|
1915 |
+
formatevents = B = C = hastdata = null;
|
1916 |
+
//return htb;
|
1917 |
+
}
|
1918 |
+
|
1919 |
+
//formate datetime
|
1920 |
+
function formartEventsInHashtable(events, startday, daylength, rbdate, redate) {
|
1921 |
+
var hast = new Object();
|
1922 |
+
var l = events.length;
|
1923 |
+
|
1924 |
+
|
1925 |
+
for (var i = 0; i < l; i++) {
|
1926 |
+
var sD = events[i][2];
|
1927 |
+
var eD = events[i][3];
|
1928 |
+
var diff = DateDiff("d", sD, eD);
|
1929 |
+
var s = {};
|
1930 |
+
s.event = events[i];
|
1931 |
+
s.day = sD.getDate();
|
1932 |
+
s.year = sD.getFullYear();
|
1933 |
+
s.month = sD.getMonth() + 1;
|
1934 |
+
s.allday = events[i][4] == 1;
|
1935 |
+
s.crossday = events[i][5] == 1;
|
1936 |
+
s.reevent = events[i][6];// == 1; //Recurring event
|
1937 |
+
s.daystr = s.year + "/" + s.month + "/" + s.day;
|
1938 |
+
s.st = {};
|
1939 |
+
s.st.hour = sD.getHours();
|
1940 |
+
s.st.minute = sD.getMinutes();
|
1941 |
+
s.st.p = s.st.hour * 60 + s.st.minute; // start time position
|
1942 |
+
s.et = {};
|
1943 |
+
s.et.hour = eD.getHours();
|
1944 |
+
s.et.minute = eD.getMinutes();
|
1945 |
+
s.et.p = s.et.hour * 60 + s.et.minute; // end time postition
|
1946 |
+
|
1947 |
+
if (diff > 0) {
|
1948 |
+
if (sD < rbdate) { //start date out of range
|
1949 |
+
sD = rbdate;
|
1950 |
+
}
|
1951 |
+
if (eD > redate) { //end date out of range
|
1952 |
+
eD = redate;
|
1953 |
+
}
|
1954 |
+
var f = startday - sD.getDay();
|
1955 |
+
if (f > 0) { f -= daylength; }
|
1956 |
+
sD = new Date(sD.getFullYear(), sD.getMonth(), sD.getDate());
|
1957 |
+
var sdtemp = DateAdd("d", f, sD);
|
1958 |
+
|
1959 |
+
for (; sdtemp <= eD; sD = sdtemp = DateAdd("d", daylength, sdtemp)) {
|
1960 |
+
var d = Clone(s);
|
1961 |
+
|
1962 |
+
while (!__VIEWWEEKDAYS[sD.getDay()] && sdtemp <= eD)
|
1963 |
+
{
|
1964 |
+
sD = DateAdd("d", 1, sD);
|
1965 |
+
}
|
1966 |
+
|
1967 |
+
var key = dateFormat.call(sD, "MMddyyyy");
|
1968 |
+
|
1969 |
+
var x = DateDiff("d", sdtemp, eD);
|
1970 |
+
var y = DateDiff("d", sdtemp, sD);
|
1971 |
+
if (hast[key] == null) {
|
1972 |
+
hast[key] = [];
|
1973 |
+
}
|
1974 |
+
//d.colSpan = (x >= daylength) ? daylength - DateDiff("d", sdtemp, sD) : DateDiff("d", sD, eD) + 1;
|
1975 |
+
if (x >= daylength)
|
1976 |
+
{
|
1977 |
+
if (y==0)
|
1978 |
+
d.colSpan = __VIEWWEEKDAYSTOTAL
|
1979 |
+
else
|
1980 |
+
{
|
1981 |
+
var sdtemp2 = DateAdd("d", daylength, sdtemp);
|
1982 |
+
d.colSpan = 0;
|
1983 |
+
|
1984 |
+
for (var x=sD;x<sdtemp2;x=DateAdd("d", 1, x))
|
1985 |
+
d.colSpan += __VIEWWEEKDAYS[x.getDay()];
|
1986 |
+
}
|
1987 |
+
}
|
1988 |
+
else
|
1989 |
+
{
|
1990 |
+
d.colSpan = 0;
|
1991 |
+
for (var x=sD;x<=eD;x=DateAdd("d", 1, x))
|
1992 |
+
d.colSpan += __VIEWWEEKDAYS[x.getDay()];
|
1993 |
+
}
|
1994 |
+
if (d.colSpan > 0)
|
1995 |
+
hast[key].push(d);
|
1996 |
+
d = null;
|
1997 |
+
}
|
1998 |
+
}
|
1999 |
+
else {
|
2000 |
+
var key = dateFormat.call(events[i][2], "MMddyyyy");
|
2001 |
+
if (hast[key] == null) {
|
2002 |
+
hast[key] = [];
|
2003 |
+
}
|
2004 |
+
s.colSpan = 1;
|
2005 |
+
hast[key].push(s);
|
2006 |
+
}
|
2007 |
+
s = null;
|
2008 |
+
}
|
2009 |
+
return hast;
|
2010 |
+
}
|
2011 |
+
function BuildMonthRow(htr, events, dMax, sc, day,startday) {
|
2012 |
+
var x = [];
|
2013 |
+
var y = [];
|
2014 |
+
var z = [];
|
2015 |
+
var cday = [];
|
2016 |
+
var l = events.length;
|
2017 |
+
var el = 0;
|
2018 |
+
//var c = tc();
|
2019 |
+
for (var j = 0; j < l; j++) {
|
2020 |
+
x.push(0);
|
2021 |
+
y.push(0);
|
2022 |
+
z.push(0);
|
2023 |
+
cday.push(DateAdd("d", j, day));
|
2024 |
+
}
|
2025 |
+
for (var j = 0; j < l; j++) {
|
2026 |
+
var ec = events[j] ? events[j].length : 0;
|
2027 |
+
y[j] += ec;
|
2028 |
+
for (var k = 0; k < ec; k++) {
|
2029 |
+
var e = events[j][k];
|
2030 |
+
//alert(e.colSpan);
|
2031 |
+
if (e && e.colSpan > 1) {
|
2032 |
+
for (var m = 1; m < e.colSpan; m++) {
|
2033 |
+
y[j + m]++;
|
2034 |
+
}
|
2035 |
+
}
|
2036 |
+
}
|
2037 |
+
}
|
2038 |
+
//var htr=[];
|
2039 |
+
var tdtemp = "<td class='${cssclass}' display='${display}' axis='${axis}' ch='${ch}' abbr='${abbr}' title='${title}' ${otherAttr}>${html}</td>";
|
2040 |
+
var tmp_h = 0;
|
2041 |
+
for (var j = 0; j < sc && el < dMax; j++) {
|
2042 |
+
htr.push("<tr>");
|
2043 |
+
//var gridtr = $(__TRTEMP);
|
2044 |
+
for (var h = 0; h < l; ) {
|
2045 |
+
var cdisplay = 0;
|
2046 |
+
var e = events[h] ? events[h][x[h]] : undefined;
|
2047 |
+
var tempdata = { "class": "", axis: "", ch: "", title: "", abbr: "", html: "", otherAttr: "", click: "javascript:void(0);" };
|
2048 |
+
var tempCss = ["st-c"];
|
2049 |
+
if (e)
|
2050 |
+
{
|
2051 |
+
x[h] = x[h] + 1;
|
2052 |
+
//last event of the day
|
2053 |
+
var bs = false;
|
2054 |
+
if (z[h] + 1 == y[h] && e.colSpan == 1) {
|
2055 |
+
bs = true;
|
2056 |
+
}
|
2057 |
+
if (!bs && j == (sc - 1) && z[h] < y[h]) {
|
2058 |
+
el++;//here
|
2059 |
+
$.extend(tempdata, { "axis": h, ch: "more", "abbr": dateFormat.call(cday[h], "M/d/yyyy"), html: i18n.dcmvcal.others + " " + (y[h] - z[h]) + i18n.dcmvcal.item, click: "javascript:alert('more event');" });
|
2060 |
+
tempCss.push("st-more st-moreul");
|
2061 |
+
h++;
|
2062 |
+
}
|
2063 |
+
else {
|
2064 |
+
tempdata.html = BuildMonthDayEvent(e, cday[h], l - h);
|
2065 |
+
tempdata.ch = "show";
|
2066 |
+
if (e.colSpan > 1) {
|
2067 |
+
tempdata.otherAttr = " colSpan='" + e.colSpan + "'";
|
2068 |
+
for (var m = 0; m < e.colSpan; m++) {
|
2069 |
+
z[h + m] = z[h + m] + 1;
|
2070 |
+
}
|
2071 |
+
|
2072 |
+
var zz = 0;
|
2073 |
+
for (var p=0; p<e.colSpan;)
|
2074 |
+
{
|
2075 |
+
p += __VIEWWEEKDAYS[cday[h+zz].getDay()];
|
2076 |
+
zz++;
|
2077 |
+
}
|
2078 |
+
|
2079 |
+
h += zz;
|
2080 |
+
|
2081 |
+
}
|
2082 |
+
else {
|
2083 |
+
z[h] = z[h] + 1;
|
2084 |
+
h++;
|
2085 |
+
}
|
2086 |
+
el++;
|
2087 |
+
}
|
2088 |
+
}
|
2089 |
+
else {
|
2090 |
+
if (j == (sc - 1) && z[h] < y[h] && y[h] > 0) {
|
2091 |
+
$.extend(tempdata, { "axis": h, ch: "more", "abbr": dateFormat.call(cday[h], "M/d/yyyy"), html: i18n.dcmvcal.others + " " + (y[h] - z[h]) + i18n.dcmvcal.item, click: "javascript:alert('more event');" });
|
2092 |
+
tempCss.push("st-more st-moreul");
|
2093 |
+
h++;
|
2094 |
+
}
|
2095 |
+
else {
|
2096 |
+
cdisplay = 1;
|
2097 |
+
$.extend(tempdata, { html: " ", ch: "qkadd", display:1, "axis": "00:00", "abbr": dateFormat.call(cday[h], "M/d/yyyy"), title: "" });
|
2098 |
+
tempCss.push("st-s");
|
2099 |
+
tmp_h = h;
|
2100 |
+
h++;
|
2101 |
+
}
|
2102 |
+
}
|
2103 |
+
tempdata.cssclass = tempCss.join(" ");
|
2104 |
+
tempCss = null;
|
2105 |
+
if (cdisplay==0)
|
2106 |
+
htr.push(Tp(tdtemp, tempdata));
|
2107 |
+
else
|
2108 |
+
if (__VIEWWEEKDAYS[((cday[tmp_h].getDay())%7)]!=0)
|
2109 |
+
htr.push(Tp(tdtemp, tempdata));
|
2110 |
+
|
2111 |
+
tempdata = null;
|
2112 |
+
}
|
2113 |
+
htr.push("</tr>");
|
2114 |
+
}
|
2115 |
+
x = y = z = cday = null;
|
2116 |
+
//return htr;
|
2117 |
+
}
|
2118 |
+
function BuildMonthDayEvent(e, cday, length) {
|
2119 |
+
var theme;
|
2120 |
+
//if (e.event[7] && e.event[7] >= 0) {
|
2121 |
+
theme = tc(e.event[7]);
|
2122 |
+
//}
|
2123 |
+
//else {
|
2124 |
+
// theme = tc();
|
2125 |
+
//}
|
2126 |
+
var p = { color: theme[2], title: "", extendClass: "", extendHTML: "", data: "" };
|
2127 |
+
|
2128 |
+
p.title = getTitle(e.event);
|
2129 |
+
p.id = "bbit_cal_event_" + e.event[0];
|
2130 |
+
if (option.enableDrag && (option.readonly != true && (option.userEdit || ((option.userOwner==e.event[12]) && option.userEditOwner ))) && e.event[8] == 1) {
|
2131 |
+
p.eclass = "drag";
|
2132 |
+
}
|
2133 |
+
else {
|
2134 |
+
p.eclass = "cal_" + e.event[0];
|
2135 |
+
}
|
2136 |
+
p.data = e.event.join("$*$");
|
2137 |
+
var sp = "<span style=\"cursor: pointer\">${content}</span>";
|
2138 |
+
var i = "<I class=\"cic cic-tmr\"> </I>";
|
2139 |
+
var i2 = "<I class=\"cic cic-rcr\"> </I>";
|
2140 |
+
var ml = "<div class=\"st-ad-ml\"></div>";
|
2141 |
+
var mr = "<div class=\"st-ad-mr\"></div>";
|
2142 |
+
var arrm = [];
|
2143 |
+
var sf = e.event[2] < cday;
|
2144 |
+
var ef = DateDiff("d", cday, e.event[3]) >= length; //e.event[3] >= DateAdd("d", 1, cday);
|
2145 |
+
if (sf || ef) {
|
2146 |
+
if (sf) {
|
2147 |
+
arrm.push(ml);
|
2148 |
+
p.extendClass = "st-ad-mpad ";
|
2149 |
+
}
|
2150 |
+
if (ef)
|
2151 |
+
{ arrm.push(mr); }
|
2152 |
+
p.extendHTML = arrm.join("");
|
2153 |
+
|
2154 |
+
}
|
2155 |
+
var cen;
|
2156 |
+
if (!e.allday && !sf) {
|
2157 |
+
cen = fomartTimeAMPM(e.st.hour,e.st.minute,__MilitaryTime) + " " + e.event[1];
|
2158 |
+
}
|
2159 |
+
else {
|
2160 |
+
cen = e.event[1];
|
2161 |
+
}
|
2162 |
+
var content = [];
|
2163 |
+
content.push(Tp(sp, { content: cen }));
|
2164 |
+
content.push(i);
|
2165 |
+
if (e.reevent)
|
2166 |
+
{ content.push(i2); }
|
2167 |
+
p.content = content.join("");
|
2168 |
+
p.location = (e.event[9]!=null)?e.event[9]:"";
|
2169 |
+
p.description = (e.event[11]!=null)?e.event[11]:"";
|
2170 |
+
p.userEdition = ( ((option.userOwner==e.event[12]) && (option.userEditOwner || option.userDelOwner))?"uEdition":"" );
|
2171 |
+
|
2172 |
+
return Tp(__ALLDAYEVENTTEMP, p);
|
2173 |
+
}
|
2174 |
+
//to populate the data
|
2175 |
+
function populate() {
|
2176 |
+
if (option.isloading) {
|
2177 |
+
return true;
|
2178 |
+
}
|
2179 |
+
if (option.url && option.url != "") {
|
2180 |
+
option.isloading = true;
|
2181 |
+
//clearcontainer();
|
2182 |
+
if (option.onBeforeRequestData && $.isFunction(option.onBeforeRequestData)) {
|
2183 |
+
option.onBeforeRequestData(1);
|
2184 |
+
}
|
2185 |
+
var zone = new Date().getTimezoneOffset() / 60 * -1;
|
2186 |
+
var param = [
|
2187 |
+
{ name: "showdate", value: dateFormat.call(option.showday, "M/d/yyyy HH:mm") },
|
2188 |
+
{ name: "startdate", value: dateFormat.call(option.vstart, "M/d/yyyy HH:mm") },
|
2189 |
+
{ name: "enddate", value: dateFormat.call(option.vend, "M/d/yyyy HH:mm") },
|
2190 |
+
{ name: "viewtype", value: option.view },
|
2191 |
+
{ name: "list_start", value: option.list_start },
|
2192 |
+
{ name: "list_end", value: option.list_end },
|
2193 |
+
{ name: "list_eventsPerPage", value: option.list_eventsPerPage },
|
2194 |
+
{ name: "lastdate", value: ((option.lastdate=="")?"":dateFormat.call(option.lastdate, "M/d/yyyy HH:mm")) },
|
2195 |
+
{ name: "list_order", value: option.list_order },
|
2196 |
+
{ name: "timezone", value: zone }
|
2197 |
+
];
|
2198 |
+
if (option.extParam) {
|
2199 |
+
for (var pi = 0; pi < option.extParam.length; pi++) {
|
2200 |
+
param[param.length] = option.extParam[pi];
|
2201 |
+
}
|
2202 |
+
}
|
2203 |
+
|
2204 |
+
$.ajax({
|
2205 |
+
type: option.method, //
|
2206 |
+
url: option.url,
|
2207 |
+
data: param,
|
2208 |
+
//dataType: "text", // fixed jquery 1.4 not support Ms Date Json Format /Date(@Tickets)/
|
2209 |
+
dataType: "json",
|
2210 |
+
dataFilter: function(data, type) {
|
2211 |
+
//return data.replace(/"\\\/(Date\([0-9-]+\))\\\/"/gi, "new $1");
|
2212 |
+
|
2213 |
+
return data;
|
2214 |
+
},
|
2215 |
+
success: function(data) {//function(datastr) {
|
2216 |
+
//datastr =datastr.replace(/"\\\/(Date\([0-9-]+\))\\\/"/gi, 'new $1');
|
2217 |
+
//var data = (new Function("return " + datastr))();
|
2218 |
+
if (data != null && data.error != null) {
|
2219 |
+
if (option.onRequestDataError) {
|
2220 |
+
option.onRequestDataError(1, data);
|
2221 |
+
}
|
2222 |
+
}
|
2223 |
+
else {
|
2224 |
+
try {
|
2225 |
+
$.each(data.events, function(index, value) {
|
2226 |
+
|
2227 |
+
value[2] = parseDate(value[2]);
|
2228 |
+
value[3] = parseDate(value[3]);
|
2229 |
+
});
|
2230 |
+
if (option.view!="list")
|
2231 |
+
{
|
2232 |
+
data["start"] = parseDate(data["start"]);
|
2233 |
+
data["end"] = parseDate(data["end"]);
|
2234 |
+
}
|
2235 |
+
if (option.view=="list" && option.lastdate=="" && option.list_order=="desc" && data.end!="")
|
2236 |
+
option.lastdate = parseDate(data["end"]);
|
2237 |
+
if (option.view=="list" && option.lastdate=="" && option.list_order=="asc" && data.start!="")
|
2238 |
+
option.lastdate = parseDate(data["start"]);
|
2239 |
+
responseData(data, data.start, data.end);
|
2240 |
+
if (option.view!="list")
|
2241 |
+
pushER(data.start, data.end);
|
2242 |
+
} catch (e) { }
|
2243 |
+
}
|
2244 |
+
if (option.onAfterRequestData && $.isFunction(option.onAfterRequestData)) {
|
2245 |
+
option.onAfterRequestData(1);
|
2246 |
+
}
|
2247 |
+
option.isloading = false;
|
2248 |
+
},
|
2249 |
+
error: function(data) {
|
2250 |
+
try {
|
2251 |
+
if (option.onRequestDataError) {
|
2252 |
+
option.onRequestDataError(1, data);
|
2253 |
+
} else {
|
2254 |
+
alert(i18n.dcmvcal.get_data_exception);
|
2255 |
+
}
|
2256 |
+
if (option.onAfterRequestData && $.isFunction(option.onAfterRequestData)) {
|
2257 |
+
option.onAfterRequestData(1);
|
2258 |
+
}
|
2259 |
+
option.isloading = false;
|
2260 |
+
} catch (e) { }
|
2261 |
+
}
|
2262 |
+
});
|
2263 |
+
}
|
2264 |
+
else {
|
2265 |
+
alert("url" + i18n.dcmvcal.i_undefined);
|
2266 |
+
}
|
2267 |
+
}
|
2268 |
+
function responseData(data, start, end) {
|
2269 |
+
var events,v,r,ne,tmp,tmpArray=new Array(),excludeEvents=new Array();
|
2270 |
+
for (var i=0;i<data.events.length;i++)
|
2271 |
+
{
|
2272 |
+
excludeEvents=new Array();
|
2273 |
+
v = data.events[i];
|
2274 |
+
if (v[6]!="" && v[6] != null && v[6] != undefined)
|
2275 |
+
{
|
2276 |
+
if ( (v[6]+"").match(/^\d+$/) ) //special events between recurring events
|
2277 |
+
{
|
2278 |
+
excludeEvents[excludeEvents.length] = v[2].toString();
|
2279 |
+
tmpArray[tmpArray.length] = v.slice(0);
|
2280 |
+
}
|
2281 |
+
else
|
2282 |
+
{
|
2283 |
+
if (/;exdate=/i.test(v[6])) // delete event from recurring events
|
2284 |
+
{
|
2285 |
+
var vv = v[6].split(";exdate=,");
|
2286 |
+
v[6] = vv[0];
|
2287 |
+
var delEv = vv[1].split(",");
|
2288 |
+
for (var j=0;j<delEv.length;j++)
|
2289 |
+
{
|
2290 |
+
var d = delEv[j].split("/");
|
2291 |
+
var iEv = new Date(d[2],d[0]-1,d[1]);
|
2292 |
+
excludeEvents[excludeEvents.length]= iEv.toString();
|
2293 |
+
}
|
2294 |
+
}
|
2295 |
+
try
|
2296 |
+
{
|
2297 |
+
r = RRule.fromString(v[6],v[2]);//
|
2298 |
+
var diff = v[3]-v[2];
|
2299 |
+
if (option.view=="list")
|
2300 |
+
{
|
2301 |
+
if (option.list_order=="desc")
|
2302 |
+
{
|
2303 |
+
ne = r.between( parseDate(start),option.lastdate);
|
2304 |
+
for (var j=0;j<=option.list_eventsPerPage;j++)
|
2305 |
+
{
|
2306 |
+
var thenext = r.before( ne[ne.length-1], false)
|
2307 |
+
if (thenext != null && (start=="" || parseDate(start)<=thenext )&& (end=="" || parseDate(end)>=thenext ))
|
2308 |
+
ne[ne.length] = thenext;
|
2309 |
+
}
|
2310 |
+
}
|
2311 |
+
else
|
2312 |
+
{
|
2313 |
+
if (option.lastdate!="")
|
2314 |
+
ne = r.between(option.lastdate, parseDate(end));
|
2315 |
+
else if (start!="")
|
2316 |
+
ne = r.after( parseDate(start), parseDate(end));
|
2317 |
+
else
|
2318 |
+
ne = r.after( v[2], parseDate(end));
|
2319 |
+
for (var j=0;j<=option.list_eventsPerPage;j++)
|
2320 |
+
{
|
2321 |
+
var thenext = r.after( ne[ne.length-1], false)
|
2322 |
+
if (thenext != null && (start=="" || parseDate(start)<=thenext )&& (end=="" || parseDate(end)>=thenext ))
|
2323 |
+
ne[ne.length] = thenext;
|
2324 |
+
}
|
2325 |
+
}
|
2326 |
+
}
|
2327 |
+
else
|
2328 |
+
ne = r.between( DateAdd("d", -1, start), DateAdd("d", 1, end));
|
2329 |
+
for (var j=0;j<ne.length;j++)
|
2330 |
+
{
|
2331 |
+
var date00 = new Date(ne[j].getFullYear(), ne[j].getMonth(), ne[j].getDate());
|
2332 |
+
if (($.inArray(date00.toString(), excludeEvents))==-1)
|
2333 |
+
{
|
2334 |
+
tmp = v.slice(0);
|
2335 |
+
tmp[2] = ne[j];
|
2336 |
+
tmp[3] = DateAdd("l", diff , ne[j]);
|
2337 |
+
tmpArray[tmpArray.length] = tmp;
|
2338 |
+
}
|
2339 |
+
}
|
2340 |
+
}catch (e) {}
|
2341 |
+
}
|
2342 |
+
}
|
2343 |
+
else
|
2344 |
+
tmpArray[tmpArray.length] = v.slice(0);
|
2345 |
+
}
|
2346 |
+
data.events = tmpArray;
|
2347 |
+
//if (data.issort == false) {
|
2348 |
+
|
2349 |
+
//if (option.view!="list"){
|
2350 |
+
if (data.events && data.events.length > 0) {
|
2351 |
+
if (option.view=="list" && option.list_order=="desc")
|
2352 |
+
events = data.events.sort(function(l, r) { return ((l[2].toString() == r[2].toString())? (l[0] > r[0] ? -1 : 1) : (l[2] > r[2] ? -1 : 1) ); });
|
2353 |
+
else
|
2354 |
+
events = data.events.sort(function(l, r) { return ((l[2].toString() == r[2].toString())? (l[0] > r[0] ? 1 : -1) : (l[2] > r[2] ? 1 : -1) ); });
|
2355 |
+
}
|
2356 |
+
else {
|
2357 |
+
events = [];
|
2358 |
+
}
|
2359 |
+
//}
|
2360 |
+
//else {
|
2361 |
+
// events = data.events;
|
2362 |
+
//}
|
2363 |
+
if (option.view=="list")
|
2364 |
+
option.eventItems = [];
|
2365 |
+
ConcatEvents(events, start, end);
|
2366 |
+
render();
|
2367 |
+
|
2368 |
+
|
2369 |
+
}
|
2370 |
+
function clearrepeat(events, start, end) {
|
2371 |
+
var jl = events.length;
|
2372 |
+
if (jl > 0) {
|
2373 |
+
var es = events[0][2];
|
2374 |
+
var el = events[jl - 1][2];
|
2375 |
+
for (var i = 0, l = option.eventItems.length; i < l; i++) {
|
2376 |
+
if (option.eventItems[i][2] > el || jl == 0) {
|
2377 |
+
break;
|
2378 |
+
}
|
2379 |
+
|
2380 |
+
if (option.eventItems[i][2] >= es) {
|
2381 |
+
for (var j = 0; j < jl; j++) {
|
2382 |
+
if (
|
2383 |
+
(option.eventItems[i][0] == events[j][0])
|
2384 |
+
&& (option.eventItems[i][2].toString() == events[j][2].toString())
|
2385 |
+
&& ((option.eventItems[i][2] < start)
|
2386 |
+
|| (option.eventItems[i][2] > end))
|
2387 |
+
) {
|
2388 |
+
events.splice(j, 1); //for duplicated event
|
2389 |
+
jl--;
|
2390 |
+
break;
|
2391 |
+
}
|
2392 |
+
}
|
2393 |
+
}
|
2394 |
+
}
|
2395 |
+
}
|
2396 |
+
}
|
2397 |
+
function ConcatEvents(events, start, end) {
|
2398 |
+
if (!events) {
|
2399 |
+
events = [];
|
2400 |
+
}
|
2401 |
+
if (events) {
|
2402 |
+
if (option.eventItems.length == 0) {
|
2403 |
+
option.eventItems = events;
|
2404 |
+
}
|
2405 |
+
else {
|
2406 |
+
//remove duplicated one
|
2407 |
+
clearrepeat(events, start, end);
|
2408 |
+
var l = events.length;
|
2409 |
+
var sl = option.eventItems.length;
|
2410 |
+
var sI = -1;
|
2411 |
+
var eI = sl;
|
2412 |
+
var s = start;
|
2413 |
+
var e = end;
|
2414 |
+
if (option.eventItems[0][2] > e)
|
2415 |
+
{
|
2416 |
+
option.eventItems = events.concat(option.eventItems);
|
2417 |
+
return;
|
2418 |
+
}
|
2419 |
+
if (option.eventItems[sl - 1][2] < s)
|
2420 |
+
{
|
2421 |
+
option.eventItems = option.eventItems.concat(events);
|
2422 |
+
return;
|
2423 |
+
}
|
2424 |
+
for (var i = 0; i < sl; i++) {
|
2425 |
+
if (option.eventItems[i][2] >= s && sI < 0) {
|
2426 |
+
sI = i;
|
2427 |
+
continue;
|
2428 |
+
}
|
2429 |
+
if (option.eventItems[i][2] > e) {
|
2430 |
+
eI = i;
|
2431 |
+
break;
|
2432 |
+
}
|
2433 |
+
}
|
2434 |
+
|
2435 |
+
var e1 = sI <= 0 ? [] : option.eventItems.slice(0, sI);
|
2436 |
+
var e2 = eI == sl ? [] : option.eventItems.slice(eI);
|
2437 |
+
option.eventItems = [].concat(e1, events, e2);
|
2438 |
+
events = e1 = e2 = null;
|
2439 |
+
}
|
2440 |
+
}
|
2441 |
+
}
|
2442 |
+
//utils goes here
|
2443 |
+
function weekormonthtoday(e) {
|
2444 |
+
$('#show'+option.view+"btn"+option.thecontainer).removeClass("ui-state-active");
|
2445 |
+
var th = $(this);
|
2446 |
+
var daystr = th.attr("abbr");
|
2447 |
+
option.showday = str_MdyyyyHHmm_todate(daystr + " 00:00");
|
2448 |
+
option.view = "day";
|
2449 |
+
$('#show'+option.view+"btn"+option.thecontainer).addClass("ui-state-active");
|
2450 |
+
render();
|
2451 |
+
if (option.onweekormonthtoday) {
|
2452 |
+
option.onweekormonthtoday(option);
|
2453 |
+
}
|
2454 |
+
e.stopPropagation();
|
2455 |
+
}
|
2456 |
+
function move_mv_dlg(){
|
2457 |
+
$(".mv_dlg").css("top",parseFloat($(".mv_dlg").css("top"))+17);
|
2458 |
+
$(".mv_dlg").css("left",parseFloat($(".mv_dlg").css("left"))-29);
|
2459 |
+
$(".mv_dlg").css("height","0px");
|
2460 |
+
}
|
2461 |
+
function parseDate(str){
|
2462 |
+
var s = str.split(" ");
|
2463 |
+
var s0 = s[0].split("/");
|
2464 |
+
var s1 = s[1].split(":");
|
2465 |
+
if (s1.length!=2)
|
2466 |
+
s1 = new Array(0,0);
|
2467 |
+
return new Date(s0[2]*1, s0[0]*1-1, s0[1]*1,s1[0]*1,s1[1]*1);
|
2468 |
+
}
|
2469 |
+
function gP(h, m) {
|
2470 |
+
//return h * 42 + parseInt(m / 60 * 42);
|
2471 |
+
if (h>option.hoursEnd)
|
2472 |
+
return (option.hoursEnd-option.hoursStart+1) * option.cellheight ;
|
2473 |
+
else
|
2474 |
+
return (h-option.hoursStart) * option.cellheight + parseInt(m / 60 * option.cellheight);
|
2475 |
+
}
|
2476 |
+
function gW(ts1, ts2) {
|
2477 |
+
if (ts1>=ts2)
|
2478 |
+
ts2 = ts1+ (option.cellheight/2);
|
2479 |
+
var t1 = ts1 / option.cellheight;
|
2480 |
+
var t2 = parseInt(t1) + option.hoursStart;
|
2481 |
+
var t3 = t1 - t2 +option.hoursStart >= 0.5 ? 30 : 0;
|
2482 |
+
var t4 = ts2 / option.cellheight;
|
2483 |
+
var t5 = parseInt(t4) + option.hoursStart;
|
2484 |
+
var t6 = t4 - t5 + option.hoursStart>= 0.5 ? 30 : 0;
|
2485 |
+
if (t5>23)
|
2486 |
+
{
|
2487 |
+
t5 = 23;
|
2488 |
+
t6 = 30;
|
2489 |
+
}
|
2490 |
+
if (t2==t5 && t3==t6)
|
2491 |
+
if (t3==0)
|
2492 |
+
t6 = 30;
|
2493 |
+
else
|
2494 |
+
{
|
2495 |
+
t5++;
|
2496 |
+
t6 = 0;
|
2497 |
+
}
|
2498 |
+
return { sh: t2, sm: t3, eh: t5, em: t6, h: ts2 - ts1 };
|
2499 |
+
}
|
2500 |
+
function gH(y1, y2, pt) {
|
2501 |
+
var sy1 = Math.min(y1, y2);
|
2502 |
+
var sy2 = Math.max(y1, y2);
|
2503 |
+
var t1 = (sy1 - pt) / option.cellheight;
|
2504 |
+
var t2 = parseInt(t1) + option.hoursStart;
|
2505 |
+
var t3 = t1 - t2 +option.hoursStart>= 0.5 ? 30 : 0;
|
2506 |
+
var t4 = (sy2 - pt) / option.cellheight;
|
2507 |
+
var t5 = parseInt(t4) + option.hoursStart;
|
2508 |
+
var t6 = t4 - t5 +option.hoursStart>= 0.5 ? 30 : 0;
|
2509 |
+
return { sh: t2, sm: t3, eh: t5, em: t6, h: sy2 - sy1 };
|
2510 |
+
}
|
2511 |
+
function pZero(n) {
|
2512 |
+
return n < 10 ? "0" + n : "" + n;
|
2513 |
+
}
|
2514 |
+
//to get color list array
|
2515 |
+
function tc(d) {
|
2516 |
+
function zc(c, i) {
|
2517 |
+
var d = "666666888888aaaaaabbbbbbdddddda32929cc3333d96666e69999f0c2c2b1365fdd4477e67399eea2bbf5c7d67a367a994499b373b3cca2cce1c7e15229a36633cc8c66d9b399e6d1c2f029527a336699668cb399b3ccc2d1e12952a33366cc668cd999b3e6c2d1f01b887a22aa9959bfb391d5ccbde6e128754e32926265ad8999c9b1c2dfd00d78131096184cb05288cb8cb8e0ba52880066aa008cbf40b3d580d1e6b388880eaaaa11bfbf4dd5d588e6e6b8ab8b00d6ae00e0c240ebd780f3e7b3be6d00ee8800f2a640f7c480fadcb3b1440edd5511e6804deeaa88f5ccb8865a5aa87070be9494d4b8b8e5d4d47057708c6d8ca992a9c6b6c6ddd3dd4e5d6c6274878997a5b1bac3d0d6db5a69867083a894a2beb8c1d4d4dae54a716c5c8d8785aaa5aec6c3cedddb6e6e41898951a7a77dc4c4a8dcdccb8d6f47b08b59c4a883d8c5ace7dcce";
|
2518 |
+
return "#" + d.substring(c * 30 + i * 6, c * 30 + (i + 1) * 6);
|
2519 |
+
}
|
2520 |
+
var c = d != null && d != undefined ? d : option.theme;
|
2521 |
+
d = d != null && d != undefined && d != -1 ? d : option.theme;
|
2522 |
+
return [d,d,d,d];
|
2523 |
+
}
|
2524 |
+
function Tp(temp, dataarry) {
|
2525 |
+
return temp.replace(/\$\{([\w]+)\}/g, function(s1, s2) { var s = dataarry[s2]; if (typeof (s) != "undefined") { return s; } else { return s1; } });
|
2526 |
+
}
|
2527 |
+
function Ta(temp, dataarry) {
|
2528 |
+
return temp.replace(/\{([\d])\}/g, function(s1, s2) { var s = dataarry[s2]; if (typeof (s) != "undefined") { return encodeURIComponent(s); } else { return ""; } });
|
2529 |
+
}
|
2530 |
+
function fomartTimeShow(h) {
|
2531 |
+
//return h < 10 ? "0" + h + ":00" : h + ":00";//ampm
|
2532 |
+
var tmp = ((h%12) < 10) && h!=12 ? "0" + (h%12) + ":00" : (h==12?"12":(h%12)) + ":00";
|
2533 |
+
tmp += " " + ((h>=12)?"pm":"am");
|
2534 |
+
return tmp ;
|
2535 |
+
}
|
2536 |
+
|
2537 |
+
function getymformat(date, comparedate, isshowtime, isshowweek, showcompare) {
|
2538 |
+
var showyear = isshowtime != undefined ? (date.getFullYear() != new Date().getFullYear()) : true;
|
2539 |
+
var showmonth = true;
|
2540 |
+
var showday = true;
|
2541 |
+
var showtime = isshowtime || false;
|
2542 |
+
var showweek = isshowweek || false;
|
2543 |
+
if (comparedate) {
|
2544 |
+
showyear = comparedate.getFullYear() != date.getFullYear();
|
2545 |
+
//showmonth = comparedate.getFullYear() != date.getFullYear() || date.getMonth() != comparedate.getMonth();
|
2546 |
+
if (comparedate.getFullYear() == date.getFullYear() &&
|
2547 |
+
date.getMonth() == comparedate.getMonth() &&
|
2548 |
+
date.getDate() == comparedate.getDate()
|
2549 |
+
) {
|
2550 |
+
showyear = showmonth = showday = showweek = false;
|
2551 |
+
}
|
2552 |
+
}
|
2553 |
+
|
2554 |
+
var a = [];
|
2555 |
+
if (showyear) {
|
2556 |
+
a.push(i18n.dcmvcal.dateformat.fulldayshow)
|
2557 |
+
} else if (showmonth) {
|
2558 |
+
a.push(i18n.dcmvcal.dateformat.Md3)
|
2559 |
+
} else if (showday) {
|
2560 |
+
a.push(i18n.dcmvcal.dateformat.day);
|
2561 |
+
}
|
2562 |
+
a.push(showweek ? " (W)" : "", showtime ? " HH:mm" : "");
|
2563 |
+
return a.join("");
|
2564 |
+
}
|
2565 |
+
function CalDateShow(startday, endday, isshowtime, isshowweek) {
|
2566 |
+
if (!endday) {
|
2567 |
+
return dateFormat.call(startday, getymformat(startday,null,isshowtime));
|
2568 |
+
} else {
|
2569 |
+
var strstart= dateFormat.call(startday, getymformat(startday, null, isshowtime, isshowweek));
|
2570 |
+
var strend=dateFormat.call(endday, getymformat(endday, startday, isshowtime, isshowweek));
|
2571 |
+
var join = (strend!=""? " - ":"");
|
2572 |
+
return [strstart,strend].join(join);
|
2573 |
+
}
|
2574 |
+
}
|
2575 |
+
|
2576 |
+
function dochange() {
|
2577 |
+
var d = getRdate();
|
2578 |
+
var loaded = checkInEr(d.start, d.end);
|
2579 |
+
//if (!loaded)
|
2580 |
+
{
|
2581 |
+
populate();
|
2582 |
+
}
|
2583 |
+
}
|
2584 |
+
|
2585 |
+
function checkInEr(start, end) {
|
2586 |
+
var ll = option.loadDateR.length;
|
2587 |
+
if (ll == 0) {
|
2588 |
+
return false;
|
2589 |
+
}
|
2590 |
+
var r = false;
|
2591 |
+
var r2 = false;
|
2592 |
+
for (var i = 0; i < ll; i++) {
|
2593 |
+
r = false, r2 = false;
|
2594 |
+
var dr = option.loadDateR[i];
|
2595 |
+
if (start >= dr.startdate && start <= dr.enddate) {
|
2596 |
+
r = true;
|
2597 |
+
}
|
2598 |
+
if (dateFormat.call(start, "yyyyMMdd") == dateFormat.call(dr.startdate, "yyyyMMdd") || dateFormat.call(start, "yyyyMMdd") == dateFormat.call(dr.enddate, "yyyyMMdd")) {
|
2599 |
+
r = true;
|
2600 |
+
}
|
2601 |
+
if (!end)
|
2602 |
+
{ r2 = true; }
|
2603 |
+
else {
|
2604 |
+
if (end >= dr.startdate && end <= dr.enddate) {
|
2605 |
+
r2 = true;
|
2606 |
+
}
|
2607 |
+
if (dateFormat.call(end, "yyyyMMdd") == dateFormat.call(dr.startdate, "yyyyMMdd") || dateFormat.call(end, "yyyyMMdd") == dateFormat.call(dr.enddate, "yyyyMMdd")) {
|
2608 |
+
r2 = true;
|
2609 |
+
}
|
2610 |
+
}
|
2611 |
+
if (r && r2) {
|
2612 |
+
break;
|
2613 |
+
}
|
2614 |
+
}
|
2615 |
+
return r && r2;
|
2616 |
+
}
|
2617 |
+
|
2618 |
+
function buildtempdayevent(sh, sm, eh, em, h, title, w, resize, thindex) {
|
2619 |
+
var theme = thindex != undefined && thindex != -1 && thindex != "" ? tc(thindex) : tc();
|
2620 |
+
var newtemp = Tp(__SCOLLEVENTTEMP, {
|
2621 |
+
location:"",
|
2622 |
+
description:"",
|
2623 |
+
bdcolor: theme[0],
|
2624 |
+
bgcolor2: theme[0],
|
2625 |
+
bgcolor1: theme[2],
|
2626 |
+
data: "",
|
2627 |
+
starttime: [pZero(sh), pZero(sm)].join(":"),
|
2628 |
+
endtime: [pZero(eh), pZero(em)].join(":"),
|
2629 |
+
content: title ? title : i18n.dcmvcal.new_event,
|
2630 |
+
title: title ? title : i18n.dcmvcal.new_event,
|
2631 |
+
icon: "<I class=\"cic cic-tmr\"> </I>",
|
2632 |
+
top: "0px",
|
2633 |
+
left: "",
|
2634 |
+
width: w ? w : "100%",
|
2635 |
+
height: h - 4,
|
2636 |
+
i: "-1",
|
2637 |
+
drag: "drag-chip",
|
2638 |
+
redisplay: resize ? "block" : "none"
|
2639 |
+
});
|
2640 |
+
return newtemp;
|
2641 |
+
}
|
2642 |
+
|
2643 |
+
function getdata(chip) {
|
2644 |
+
var hddata = chip.find("div.dhdV");
|
2645 |
+
if (hddata.length == 1) {
|
2646 |
+
var str = hddata.html();
|
2647 |
+
return parseED(str.split("$*$"));
|
2648 |
+
}
|
2649 |
+
return null;
|
2650 |
+
}
|
2651 |
+
function parseED(data) {
|
2652 |
+
if (data.length > 6) {
|
2653 |
+
var e = [];
|
2654 |
+
e.push(data[0], data[1], new Date(data[2]), new Date(data[3]), parseInt(data[4]), parseInt(data[5]), (data[6]), data[7] != undefined ? (data[7]) : -1, data[8] != undefined ? parseInt(data[8]) : 0);
|
2655 |
+
for (var i=9;i<data.length;i++)
|
2656 |
+
e.push(data[i]);
|
2657 |
+
return e;
|
2658 |
+
}
|
2659 |
+
return null;
|
2660 |
+
|
2661 |
+
}
|
2662 |
+
function quickd(type,calid) {
|
2663 |
+
try {$("#bbit-cs-buddle").dialog("close");}catch (e) {}
|
2664 |
+
try {$(".mv_dlg_nmonth").dialog("close");}catch (e) {}
|
2665 |
+
//var calid = $("#bbit-cs-id").val();
|
2666 |
+
var param = [{ "name": "calendarId", value: calid },
|
2667 |
+
{ "name": "type", value: type}];
|
2668 |
+
var de = rebyKey(calid, true);
|
2669 |
+
option.onBeforeRequestData && option.onBeforeRequestData(3);
|
2670 |
+
$.post(option.quickDeleteUrl, param, function(data) {
|
2671 |
+
if (data) {
|
2672 |
+
if (data.IsSuccess) {
|
2673 |
+
de = null;
|
2674 |
+
populate();
|
2675 |
+
option.onAfterRequestData && option.onAfterRequestData(3);
|
2676 |
+
}
|
2677 |
+
else {
|
2678 |
+
option.onRequestDataError && option.onRequestDataError(3, data);
|
2679 |
+
Ind(de);
|
2680 |
+
//render();
|
2681 |
+
populate();
|
2682 |
+
option.onAfterRequestData && option.onAfterRequestData(3);
|
2683 |
+
}
|
2684 |
+
}
|
2685 |
+
}, "json");
|
2686 |
+
//render();
|
2687 |
+
populate();
|
2688 |
+
}
|
2689 |
+
function getbuddlepos(x, y) {
|
2690 |
+
//return { left: 0, top: 0, hide: false };
|
2691 |
+
var tleft = x - 110;
|
2692 |
+
var ttop = y - 217;
|
2693 |
+
var maxLeft = document.documentElement.clientWidth;
|
2694 |
+
var maxTop = document.documentElement.clientHeight;
|
2695 |
+
var ishide = false;
|
2696 |
+
if (tleft <= 0 || ttop <= 0 || tleft + 400 > maxLeft) {
|
2697 |
+
tleft = x - 200 <= 0 ? 10 : x - 200;
|
2698 |
+
ttop = y - 159 <= 0 ? 10 : y - 159;
|
2699 |
+
if (tleft + 400 >= maxLeft) {
|
2700 |
+
tleft = maxLeft - 410;
|
2701 |
+
}
|
2702 |
+
if (ttop + 164 >= maxTop) {
|
2703 |
+
ttop = maxTop - 165;
|
2704 |
+
}
|
2705 |
+
ishide = true;
|
2706 |
+
}
|
2707 |
+
return { left: tleft, top: ttop, hide: ishide };
|
2708 |
+
}
|
2709 |
+
function dayshow(e, data) {
|
2710 |
+
if (data == undefined) {
|
2711 |
+
data = getdata($(this));
|
2712 |
+
}
|
2713 |
+
if (data != null) {
|
2714 |
+
if (option.quickDeleteUrl != "" && data[8] == 1 && ( (option.readonly != true) || (option.readonly == true && option.showtooltipdwm) || (option.showtooltipdwm_mouseover) )) {
|
2715 |
+
var csbuddle = '<div id="bbit-cs-buddle">'
|
2716 |
+
+'<div class="dialogdwm_event_content" style="border-left:3px solid '+((data[7] && data[7]!=-1 && data[7]!=null)?data[7]:"#"+option.paletteDefault)+';padding-left:5px"><div id="bbit-cs-buddle-timeshow" class="bubbletime"></div>'
|
2717 |
+
+'<div id="bbit-cs-title" class="bubbletitle"></div>'
|
2718 |
+
+'<div id="bbit-cs-location" class="bubblelocation"></div>'
|
2719 |
+
+'<div id="bbit-cs-description" class="bubbledescription"></div></div>';
|
2720 |
+
if (option.readonly != true && (option.userEdit || option.userDel || ((option.userOwner==data[12]) && (option.userEditOwner || option.userDelOwner))))
|
2721 |
+
{
|
2722 |
+
csbuddle +='<div class="bbit-cs-split"><input id="bbit-cs-id" type="hidden" value=""/>';
|
2723 |
+
if (option.userDel || ((option.userOwner==data[12]) && (option.userDelOwner)))
|
2724 |
+
{
|
2725 |
+
///no delete from recurring events
|
2726 |
+
if (!(data[6]!="" && data[6] != null && data[6] != undefined))
|
2727 |
+
csbuddle +='[ <a id="bbit-cs-delete" class="lk">'+ i18n.dcmvcal.i_delete + '</a> ] ';
|
2728 |
+
}
|
2729 |
+
if (option.userEdit || ((option.userOwner==data[12]) && (option.userEditOwner)))
|
2730 |
+
csbuddle +=' <a id="bbit-cs-editLink" class="lk">'+ i18n.dcmvcal.update_detail + ' <StrONG>>></StrONG></a>';
|
2731 |
+
csbuddle +='</div>';
|
2732 |
+
}
|
2733 |
+
|
2734 |
+
csbuddle +='</div>';
|
2735 |
+
$("#bbit-cal-buddle").remove();
|
2736 |
+
$(".mv_dlg").remove();
|
2737 |
+
$("#bbit-cs-buddle").remove();
|
2738 |
+
var bud = $("#bbit-cs-buddle");
|
2739 |
+
if (bud.length == 0) {
|
2740 |
+
//
|
2741 |
+
bud = $(csbuddle).appendTo(document.body);
|
2742 |
+
bud.dialog({width:option.dialogWidth,resizable: false,
|
2743 |
+
modal: false,resizable: false,maxWidth: option.dialogWidth,fluid: true,open: function(event, ui){fluidDialog();},
|
2744 |
+
position: {
|
2745 |
+
my: "left top",
|
2746 |
+
at: "center bottom",
|
2747 |
+
collision: "fit",
|
2748 |
+
of: $(this)
|
2749 |
+
}})
|
2750 |
+
$("#bbit-cs-buddle").parent().addClass("mv_dlg");
|
2751 |
+
$("<div id=\"mv_corner\" />").appendTo($(".mv_dlg .ui-dialog-titlebar"));
|
2752 |
+
move_mv_dlg();
|
2753 |
+
var calbutton = $("#bbit-cs-delete");
|
2754 |
+
var lbtn = $("#bbit-cs-editLink");
|
2755 |
+
var closebtn = $("#bubbleClose2").click(function() {
|
2756 |
+
try {$("#bbit-cs-buddle").dialog("close");}catch (e) {}
|
2757 |
+
});
|
2758 |
+
calbutton.click(function() {
|
2759 |
+
var data = $("#bbit-cs-buddle").data("cdata");
|
2760 |
+
if (option.DeleteCmdhandler && $.isFunction(option.DeleteCmdhandler)) {
|
2761 |
+
option.DeleteCmdhandler.call(this, data, quickd);
|
2762 |
+
}
|
2763 |
+
//else {
|
2764 |
+
// if (confirm(i18n.dcmvcal.confirm_delete_event + "?")) {
|
2765 |
+
// var s = 0; //0 single event , 1 for Recurring event
|
2766 |
+
// if (data[6] == 1) {
|
2767 |
+
// if (confirm(i18n.dcmvcal.confrim_delete_event_or_all)) {
|
2768 |
+
// s = 0;
|
2769 |
+
// }
|
2770 |
+
// else {
|
2771 |
+
// s = 1;
|
2772 |
+
// }
|
2773 |
+
// }
|
2774 |
+
// else {
|
2775 |
+
// s = 0;
|
2776 |
+
// }
|
2777 |
+
// quickd(s);
|
2778 |
+
// }
|
2779 |
+
//}
|
2780 |
+
});
|
2781 |
+
lbtn.click(function(e) {
|
2782 |
+
if (!option.EditCmdhandler) {
|
2783 |
+
alert("EditCmdhandler" + i18n.dcmvcal.i_undefined);
|
2784 |
+
}
|
2785 |
+
else {
|
2786 |
+
if (option.EditCmdhandler && $.isFunction(option.EditCmdhandler)) {
|
2787 |
+
var data = $("#bbit-cs-buddle").data("cdata");
|
2788 |
+
$("#bbit-cs-buddle").remove();
|
2789 |
+
option.EditCmdhandler.call(this, data);
|
2790 |
+
}
|
2791 |
+
}
|
2792 |
+
|
2793 |
+
e.stopPropagation();
|
2794 |
+
});
|
2795 |
+
bud.click(function(e) {
|
2796 |
+
e.stopPropagation();
|
2797 |
+
return;
|
2798 |
+
});
|
2799 |
+
}
|
2800 |
+
var ss = [];
|
2801 |
+
var iscos = DateDiff("d", data[2], data[3]) != 0;
|
2802 |
+
ss.push(dateFormat.call(data[2], i18n.dcmvcal.dateformat.fulldayshow));
|
2803 |
+
if (data[4] != 1) {
|
2804 |
+
ss.push(" ",fomartTimeAMPM(data[2].getHours(),data[2].getMinutes(),__MilitaryTime))
|
2805 |
+
}
|
2806 |
+
|
2807 |
+
if (iscos) {
|
2808 |
+
ss.push(" - ", dateFormat.call(data[3], i18n.dcmvcal.dateformat.fulldayshow));
|
2809 |
+
if (data[4] != 1) {
|
2810 |
+
ss.push(" ",fomartTimeAMPM(data[3].getHours(),data[3].getMinutes(),__MilitaryTime))
|
2811 |
+
}
|
2812 |
+
}
|
2813 |
+
else if (data[4] != 1)
|
2814 |
+
ss.push(" - ",fomartTimeAMPM(data[3].getHours(),data[3].getMinutes(),__MilitaryTime));
|
2815 |
+
var ts = $("#bbit-cs-buddle-timeshow").html(ss.join(""));
|
2816 |
+
$("#bbit-cs-id").val(data[0]);
|
2817 |
+
$(".dialogdwm_event_content").find("#bbit-cs-title").html(data[1]);
|
2818 |
+
$(".dialogdwm_event_content").find("#bbit-cs-location").html(data[9]);
|
2819 |
+
$(".dialogdwm_event_content").find("#bbit-cs-description").html(data[11]);
|
2820 |
+
|
2821 |
+
bud.data("cdata", data);
|
2822 |
+
//bud.css({ "visibility": "visible", left: pos.left, top: pos.top });
|
2823 |
+
|
2824 |
+
$(document).one("click", function() {
|
2825 |
+
try {$("#bbit-cs-buddle").dialog("close");}catch (e) {}
|
2826 |
+
});
|
2827 |
+
}
|
2828 |
+
else {
|
2829 |
+
if (!option.ViewCmdhandler) {
|
2830 |
+
alert("ViewCmdhandler" + i18n.dcmvcal.i_undefined);
|
2831 |
+
}
|
2832 |
+
else {
|
2833 |
+
if (option.ViewCmdhandler && $.isFunction(option.ViewCmdhandler)) {
|
2834 |
+
option.ViewCmdhandler.call(this, data);
|
2835 |
+
}
|
2836 |
+
}
|
2837 |
+
}
|
2838 |
+
}
|
2839 |
+
else {
|
2840 |
+
alert(i18n.dcmvcal.data_format_error);
|
2841 |
+
}
|
2842 |
+
e.stopPropagation();
|
2843 |
+
}
|
2844 |
+
|
2845 |
+
function moreshow(mv) {
|
2846 |
+
var me = $(this);
|
2847 |
+
var divIndex = mv.id.replace(option.thecontainer,"").split('_')[1];
|
2848 |
+
var pdiv = $(mv);
|
2849 |
+
var offsetMe = me.position();
|
2850 |
+
var offsetP = pdiv.position();
|
2851 |
+
var width = (me.width() + 2) * 1.5;
|
2852 |
+
var top = offsetP.top + 15;
|
2853 |
+
var left = offsetMe.left;
|
2854 |
+
|
2855 |
+
var daystr = $(this).attr("abbr");
|
2856 |
+
var day = str_MdyyyyHHmm_todate(daystr + " 00:00");
|
2857 |
+
var cc = $("#cal-month-cc"+option.thecontainer);
|
2858 |
+
var ccontent = $("#cal-month-cc-content"+option.thecontainer+" table tbody");
|
2859 |
+
var ctitle = $("#cal-month-cc-title"+option.thecontainer);
|
2860 |
+
ctitle.html(dateFormat.call(day, i18n.dcmvcal.dateformat.Md3) + " " + __WDAY[day.getDay()]);
|
2861 |
+
ccontent.empty();
|
2862 |
+
//var c = tc()[2];
|
2863 |
+
var edata = $("#gridEvent"+option.thecontainer).data("mvdata");
|
2864 |
+
var events = edata[divIndex];
|
2865 |
+
var index = parseInt(this.axis);
|
2866 |
+
var htm = [];
|
2867 |
+
for (var i = 0; i <= index; i++) {
|
2868 |
+
var ec = events[i] ? events[i].length : 0;
|
2869 |
+
for (var j = 0; j < ec; j++) {
|
2870 |
+
var e = events[i][j];
|
2871 |
+
if (e) {
|
2872 |
+
if ((e.colSpan + i - 1) >= index) {
|
2873 |
+
htm.push("<tr><td class='st-c'>");
|
2874 |
+
htm.push(BuildMonthDayEvent(e, day, 1));
|
2875 |
+
htm.push("</td></tr>");
|
2876 |
+
}
|
2877 |
+
}
|
2878 |
+
}
|
2879 |
+
}
|
2880 |
+
ccontent.html(htm.join(""));
|
2881 |
+
//click
|
2882 |
+
ccontent.find("div.rb-o").each(function(i) {
|
2883 |
+
$(this).click(dayshow);
|
2884 |
+
if (option.showtooltipdwm_mouseover) {
|
2885 |
+
$(this).mouseover(dayshow);
|
2886 |
+
//if (option.readonly == true) $(this).mouseout(function() {try {$("#bbit-cs-buddle").dialog("close");}catch (e) {}});
|
2887 |
+
}
|
2888 |
+
});
|
2889 |
+
|
2890 |
+
edata = events = null;
|
2891 |
+
var height = cc.height();
|
2892 |
+
var maxleft = document.documentElement.clientWidth;
|
2893 |
+
var maxtop = document.documentElement.clientHeight;
|
2894 |
+
if (left + width >= maxleft) {
|
2895 |
+
left = offsetMe.left - (me.width() + 2) * 0.5;
|
2896 |
+
}
|
2897 |
+
if (top + height >= maxtop) {
|
2898 |
+
top = maxtop - height - 2;
|
2899 |
+
}
|
2900 |
+
var newOff = { left: left, top: top, width: width, "visibility": "visible" };//"z-index": 180,
|
2901 |
+
cc.css(newOff);
|
2902 |
+
$(document).one("click", closeCc);
|
2903 |
+
return false;
|
2904 |
+
}
|
2905 |
+
function dayupdate(data, start, end) {
|
2906 |
+
if ((data[6]!="" && data[6]!="0"))
|
2907 |
+
{
|
2908 |
+
alert("Information: Recurrent events cannot be moved this way. Edit its details to modify it.")
|
2909 |
+
populate();
|
2910 |
+
return false;
|
2911 |
+
}
|
2912 |
+
if (option.quickUpdateUrl != "" && data[8] == 1 && (option.readonly != true && (option.userEdit || ((option.userOwner==data[12]) && option.userEditOwner ))) ) {
|
2913 |
+
if (option.isloading) {
|
2914 |
+
return false;
|
2915 |
+
}
|
2916 |
+
option.isloading = true;
|
2917 |
+
var id = data[0];
|
2918 |
+
var os = data[2];
|
2919 |
+
var od = data[3];
|
2920 |
+
var zone = new Date().getTimezoneOffset() / 60 * -1;
|
2921 |
+
var param = [{ "name": "calendarId", value: id },
|
2922 |
+
{ "name": "CalendarStartTime", value: dateFormat.call(start, "M/d/yyyy HH:mm") },
|
2923 |
+
{ "name": "CalendarEndTime", value: dateFormat.call(end, "M/d/yyyy HH:mm") },
|
2924 |
+
{ "name": "timezone", value: zone }
|
2925 |
+
];
|
2926 |
+
var d;
|
2927 |
+
if (option.quickUpdateHandler && $.isFunction(option.quickUpdateHandler)) {
|
2928 |
+
option.quickUpdateHandler.call(this, param);
|
2929 |
+
}
|
2930 |
+
else {
|
2931 |
+
option.onBeforeRequestData && option.onBeforeRequestData(4);
|
2932 |
+
$.post(option.quickUpdateUrl, param, function(data) {
|
2933 |
+
if (data) {
|
2934 |
+
if (data.IsSuccess == true) {
|
2935 |
+
option.isloading = false;
|
2936 |
+
option.onAfterRequestData && option.onAfterRequestData(4);
|
2937 |
+
}
|
2938 |
+
else {
|
2939 |
+
option.onRequestDataError && option.onRequestDataError(4, data);
|
2940 |
+
option.isloading = false;
|
2941 |
+
d = rebyKey(id, true);
|
2942 |
+
d[2] = os;
|
2943 |
+
d[3] = od;
|
2944 |
+
Ind(d);
|
2945 |
+
render();
|
2946 |
+
d = null;
|
2947 |
+
option.onAfterRequestData && option.onAfterRequestData(4);
|
2948 |
+
}
|
2949 |
+
}
|
2950 |
+
}, "json");
|
2951 |
+
d = rebyKey(id, true);
|
2952 |
+
if (d) {
|
2953 |
+
d[2] = start;
|
2954 |
+
d[3] = end;
|
2955 |
+
}
|
2956 |
+
Ind(d);
|
2957 |
+
render();
|
2958 |
+
}
|
2959 |
+
}
|
2960 |
+
}
|
2961 |
+
function quickadd(start, end, isallday, pos) {
|
2962 |
+
if ((!option.quickAddHandler && option.quickAddUrl == "") || option.readonly || !option.userAdd) {
|
2963 |
+
return;
|
2964 |
+
}
|
2965 |
+
$("#bbit-cal-buddle").remove();
|
2966 |
+
$(".mv_dlg").remove();
|
2967 |
+
$("#bbit-cs-buddle").remove();
|
2968 |
+
var buddle = $("#bbit-cal-buddle");
|
2969 |
+
if (buddle.length == 0) {
|
2970 |
+
var temparr = [];
|
2971 |
+
temparr.push('<div id="bbit-cal-buddle">');
|
2972 |
+
temparr.push('<div><div class="bbit-cal-buddle-event">',i18n.dcmvcal.event,'</div>');
|
2973 |
+
temparr.push(i18n.dcmvcal.time, ':<div id="bbit-cal-buddle-timeshow" style="display:inline"></div></div><div>');
|
2974 |
+
temparr.push(i18n.dcmvcal.content, ':</div><div><div class="textbox-fill-wrapper"><div class="textbox-fill-mid">');
|
2975 |
+
if (dc_subjects && dc_subjects!="")
|
2976 |
+
{
|
2977 |
+
temparr.push('<select id="bbit-cal-what" class="textbox-fill-input">');
|
2978 |
+
for (var i=0;i<dc_subjects.length;i++)
|
2979 |
+
temparr.push('<option value="'+dc_subjects[i]+'" '+((pos.col && pos.col==dc_subjects[i])?"selected=\"selected\"":"")+'>'+dc_subjects[i]+'</option>');
|
2980 |
+
temparr.push('</select>');
|
2981 |
+
|
2982 |
+
}
|
2983 |
+
else
|
2984 |
+
temparr.push('<input id="bbit-cal-what" class="textbox-fill-input"/>');
|
2985 |
+
temparr.push('</div></div><div class="cb-example">');
|
2986 |
+
temparr.push(i18n.dcmvcal.example, '</div></div><input id="bbit-cal-start" type="hidden"/><input id="bbit-cal-end" type="hidden"/><input id="bbit-cal-allday" type="hidden"/>');
|
2987 |
+
temparr.push('<div style="float:left;display:block;cursor:pointer" class="fbutton" id="bbit-cal-AddBTN"><span style="float: left;display: block;" class="ui-icon ui-icon-new"></span><span style="float: left;display: block;height:18px;text-decoration:none;color:#000" id="bbit-cal-quickAddBTN" class="lk">', i18n.dcmvcal.create_event, '</span></div><div style="float:left;margin-left:20px"><SPAN id="bbit-cal-editLink" class="lk">');
|
2988 |
+
temparr.push(i18n.dcmvcal.update_detail, ' <StrONG>>></StrONG></SPAN></div><div style="clear:both"></div><div id="bubbleClose" class="bubble-closebutton"></div><div style="clear:both;margin-bottom:10px"></div></div>');
|
2989 |
+
var tempquickAddHanler = temparr.join("");
|
2990 |
+
temparr = null;
|
2991 |
+
|
2992 |
+
$(document.body).append(tempquickAddHanler);
|
2993 |
+
try {$("#bbit-cs-buddle").dialog("close");}catch (e) {}
|
2994 |
+
buddle = $("#bbit-cal-buddle");
|
2995 |
+
if (option.view!="nMonth")
|
2996 |
+
var pp = {
|
2997 |
+
my: "left top",
|
2998 |
+
at: "center bottom",
|
2999 |
+
collision: "fit",
|
3000 |
+
of: ($(".drag-chip").length>0)?$(".drag-chip"):$(".drag-lasso")
|
3001 |
+
};
|
3002 |
+
else
|
3003 |
+
pp = {
|
3004 |
+
my: "left top",
|
3005 |
+
at: "center bottom",
|
3006 |
+
collision: "fit",
|
3007 |
+
of:$("#nmonths"+option.thecontainer+" .ui-state-non-active[title='"+dateFormat.call(start, i18n.dcmvcal.dateformat.fulldayvalue)+"']")
|
3008 |
+
};
|
3009 |
+
buddle.dialog({width:option.dialogWidth,resizable: false,
|
3010 |
+
modal: true,resizable: false,maxWidth: option.dialogWidth,fluid: true,open: function(event, ui){fluidDialog();},
|
3011 |
+
position:pp
|
3012 |
+
|
3013 |
+
});
|
3014 |
+
buddle.dialog( "open" );
|
3015 |
+
move_mv_dlg();
|
3016 |
+
$("#bbit-cal-buddle").parent().addClass("mv_dlg");
|
3017 |
+
$("<div id=\"mv_corner\" />").appendTo($(".mv_dlg .ui-dialog-titlebar"));
|
3018 |
+
var calbutton = $("#bbit-cal-quickAddBTN");
|
3019 |
+
var lbtn = $("#bbit-cal-editLink");
|
3020 |
+
|
3021 |
+
var closebtn = $("#bubbleClose1").click(function() {
|
3022 |
+
$("#bbit-cal-buddle").dialog( "close" );
|
3023 |
+
realsedragevent();
|
3024 |
+
});
|
3025 |
+
$("#bbit-cal-what").on('keypress', function (event) {
|
3026 |
+
if(event.which === 13){
|
3027 |
+
$("#bbit-cal-quickAddBTN").trigger("click");
|
3028 |
+
}
|
3029 |
+
});
|
3030 |
+
calbutton.click(function(e) {
|
3031 |
+
if (option.isloading) {
|
3032 |
+
e.stopPropagation();
|
3033 |
+
}
|
3034 |
+
option.isloading = true;
|
3035 |
+
var what = $("#bbit-cal-what").val();
|
3036 |
+
var datestart = $("#bbit-cal-start").val();
|
3037 |
+
var dateend = $("#bbit-cal-end").val();
|
3038 |
+
|
3039 |
+
var allday = $("#bbit-cal-allday").val();
|
3040 |
+
var f = /^[^\$\<\>]+$/.test(what);
|
3041 |
+
if (!f) {
|
3042 |
+
alert(i18n.dcmvcal.invalid_title);
|
3043 |
+
$("#bbit-cal-what").focus();
|
3044 |
+
option.isloading = false;
|
3045 |
+
e.stopPropagation();
|
3046 |
+
return false;
|
3047 |
+
}
|
3048 |
+
var zone = new Date().getTimezoneOffset() / 60 * -1;
|
3049 |
+
var param = [{ "name": "CalendarTitle", value: what },
|
3050 |
+
{ "name": "CalendarStartTime", value: datestart },
|
3051 |
+
{ "name": "CalendarEndTime", value: dateend },
|
3052 |
+
{ "name": "IsAllDayEvent", value: allday },
|
3053 |
+
{ "name": "location", value: ( (dc_locations && dc_locations!="")?dc_locations[0]:"") },
|
3054 |
+
{ "name": "timezone", value: zone}];
|
3055 |
+
|
3056 |
+
if (option.extParam) {
|
3057 |
+
for (var pi = 0; pi < option.extParam.length; pi++) {
|
3058 |
+
param[param.length] = option.extParam[pi];
|
3059 |
+
}
|
3060 |
+
}
|
3061 |
+
|
3062 |
+
if (option.quickAddHandler && $.isFunction(option.quickAddHandler)) {
|
3063 |
+
option.quickAddHandler.call(this, param);
|
3064 |
+
$("#bbit-cal-buddle").dialog( "close" );
|
3065 |
+
realsedragevent();
|
3066 |
+
}
|
3067 |
+
else {
|
3068 |
+
$("#bbit-cal-buddle").dialog( "close" );
|
3069 |
+
var newdata = [];
|
3070 |
+
var tId = -1;
|
3071 |
+
option.onBeforeRequestData && option.onBeforeRequestData(2);
|
3072 |
+
$.post(option.quickAddUrl, param, function(data) {
|
3073 |
+
if (data) {
|
3074 |
+
if (data.IsSuccess == true) {
|
3075 |
+
option.isloading = false;
|
3076 |
+
newdata.push(-1, what);
|
3077 |
+
var sd = str_MdyyyyHHmm_todate(datestart);
|
3078 |
+
var ed = str_MdyyyyHHmm_todate(dateend);
|
3079 |
+
var diff = DateDiff("d", sd, ed);
|
3080 |
+
newdata.push(sd, ed, allday == "1" ? 1 : 0, diff > 0 ? 1 : 0, 0);
|
3081 |
+
newdata.push(-1, 0, ((dc_locations && dc_locations!="")?dc_locations[0]:""), "");
|
3082 |
+
tId = Ind(newdata);
|
3083 |
+
option.eventItems[tId][0] = data.Data;
|
3084 |
+
option.eventItems[tId][8] = 1;
|
3085 |
+
populate();
|
3086 |
+
option.onAfterRequestData && option.onAfterRequestData(2);
|
3087 |
+
}
|
3088 |
+
else {
|
3089 |
+
option.onRequestDataError && option.onRequestDataError(2, data);
|
3090 |
+
option.isloading = false;
|
3091 |
+
option.onAfterRequestData && option.onAfterRequestData(2);
|
3092 |
+
}
|
3093 |
+
|
3094 |
+
}
|
3095 |
+
|
3096 |
+
}, "json");
|
3097 |
+
realsedragevent();
|
3098 |
+
render();
|
3099 |
+
}
|
3100 |
+
});
|
3101 |
+
lbtn.click(function(e) {
|
3102 |
+
try {$("#bbit-cal-buddle").dialog("close");}catch (e) {}
|
3103 |
+
if (!option.EditCmdhandler) {
|
3104 |
+
alert("EditCmdhandler" + i18n.dcmvcal.i_undefined);
|
3105 |
+
}
|
3106 |
+
else {
|
3107 |
+
if (option.EditCmdhandler && $.isFunction(option.EditCmdhandler)) {
|
3108 |
+
option.EditCmdhandler.call(this, ['0', $("#bbit-cal-what").val(), $("#bbit-cal-start").val(), $("#bbit-cal-end").val(), $("#bbit-cal-allday").val()]);
|
3109 |
+
}
|
3110 |
+
realsedragevent();
|
3111 |
+
}
|
3112 |
+
e.stopPropagation();
|
3113 |
+
});
|
3114 |
+
buddle.mousedown(function(e) { e.stopPropagation(); });
|
3115 |
+
}
|
3116 |
+
var dateshow = CalDateShow(start, end, !isallday, true);
|
3117 |
+
|
3118 |
+
$("#bbit-cal-buddle-timeshow").html(dateshow);
|
3119 |
+
$("#bbit-cal-allday").val(isallday ? "1" : "0");
|
3120 |
+
$("#bbit-cal-start").val(dateFormat.call(start, "M/d/yyyy HH:mm"));
|
3121 |
+
$("#bbit-cal-end").val(dateFormat.call(end, "M/d/yyyy HH:mm"));
|
3122 |
+
|
3123 |
+
buddle.css({ "visibility": "visible"});
|
3124 |
+
var postmp = $("#bbit-cal-buddle").dialog( "option", "position");
|
3125 |
+
postmp.at = "center bottom"
|
3126 |
+
$("#bbit-cal-buddle").dialog( "option", "position",postmp);
|
3127 |
+
$("#bbit-cal-buddle").dialog( "open" );
|
3128 |
+
move_mv_dlg();
|
3129 |
+
$("#bbit-cal-what").blur().focus(); //add 2010-01-26 blur() fixed chrome
|
3130 |
+
$(document).one("mousedown", function() {
|
3131 |
+
$("#bbit-cal-buddle").dialog( "close" );
|
3132 |
+
realsedragevent();
|
3133 |
+
});
|
3134 |
+
return false;
|
3135 |
+
}
|
3136 |
+
//format datestring to Date Type
|
3137 |
+
function strtodate(str) {
|
3138 |
+
var arr = str.split(" ");
|
3139 |
+
var arr2 = arr[0].split(i18n.dcmvcal.dateformat.separator);
|
3140 |
+
var arr3 = arr[1].split(":");
|
3141 |
+
|
3142 |
+
var y = arr2[i18n.dcmvcal.dateformat.year_index];
|
3143 |
+
var m = arr2[i18n.dcmvcal.dateformat.month_index].indexOf("0") == 0 ? arr2[i18n.dcmvcal.dateformat.month_index].substr(1, 1) : arr2[i18n.dcmvcal.dateformat.month_index];
|
3144 |
+
var d = arr2[i18n.dcmvcal.dateformat.day_index].indexOf("0") == 0 ? arr2[i18n.dcmvcal.dateformat.day_index].substr(1, 1) : arr2[i18n.dcmvcal.dateformat.day_index];
|
3145 |
+
var h = arr3[0].indexOf("0") == 0 ? arr3[0].substr(1, 1) : arr3[0];
|
3146 |
+
var n = arr3[1].indexOf("0") == 0 ? arr3[1].substr(1, 1) : arr3[1];
|
3147 |
+
return new Date(y, parseInt(m) - 1, d, h, n);
|
3148 |
+
}
|
3149 |
+
//str yyyy/m/d
|
3150 |
+
function datetostr(d)
|
3151 |
+
{
|
3152 |
+
return d.getFullYear()+"/"+(d.getMonth()+1)+"/"+d.getDate();
|
3153 |
+
}
|
3154 |
+
function str_MdyyyyHHmm_todate(str) {
|
3155 |
+
var arr = str.split(" ");
|
3156 |
+
var arr2 = arr[0].split("/");
|
3157 |
+
var arr3 = arr[1].split(":");
|
3158 |
+
var y = arr2[2];
|
3159 |
+
var m = arr2[0].indexOf("0") == 0 ? arr2[0].substr(1, 1) : arr2[0];
|
3160 |
+
var d = arr2[1].indexOf("0") == 0 ? arr2[1].substr(1, 1) : arr2[1];
|
3161 |
+
var h = arr3[0].indexOf("0") == 0 ? arr3[0].substr(1, 1) : arr3[0];
|
3162 |
+
var n = arr3[1].indexOf("0") == 0 ? arr3[1].substr(1, 1) : arr3[1];
|
3163 |
+
return new Date(y, parseInt(m) - 1, d, h, n);
|
3164 |
+
}
|
3165 |
+
|
3166 |
+
function rebyKey(key, remove) {
|
3167 |
+
if (option.eventItems && option.eventItems.length > 0) {
|
3168 |
+
var sl = option.eventItems.length;
|
3169 |
+
var i = -1;
|
3170 |
+
for (var j = 0; j < sl; j++) {
|
3171 |
+
if (option.eventItems[j][0] == key) {
|
3172 |
+
i = j;
|
3173 |
+
break;
|
3174 |
+
}
|
3175 |
+
}
|
3176 |
+
if (i >= 0) {
|
3177 |
+
var t = option.eventItems[i];
|
3178 |
+
if (remove) {
|
3179 |
+
option.eventItems.splice(i, 1);
|
3180 |
+
}
|
3181 |
+
return t;
|
3182 |
+
}
|
3183 |
+
}
|
3184 |
+
return null;
|
3185 |
+
}
|
3186 |
+
function Ind(event, i) {
|
3187 |
+
var d = 0;
|
3188 |
+
if (!i) {
|
3189 |
+
if (option.eventItems && option.eventItems.length > 0) {
|
3190 |
+
var sl = option.eventItems.length;
|
3191 |
+
var s = event[2];
|
3192 |
+
var d1 = s.getTime() - option.eventItems[0][2].getTime();
|
3193 |
+
var d2 = option.eventItems[sl - 1][2].getTime() - s.getTime();
|
3194 |
+
var diff = d1 - d2;
|
3195 |
+
if (d1 < 0 || diff < 0) {
|
3196 |
+
for (var j = 0; j < sl; j++) {
|
3197 |
+
if (option.eventItems[j][2] >= s) {
|
3198 |
+
i = j;
|
3199 |
+
break;
|
3200 |
+
}
|
3201 |
+
}
|
3202 |
+
}
|
3203 |
+
else if (d2 < 0) {
|
3204 |
+
i = sl;
|
3205 |
+
}
|
3206 |
+
else {
|
3207 |
+
for (var j = sl - 1; j >= 0; j--) {
|
3208 |
+
if (option.eventItems[j][2] < s) {
|
3209 |
+
i = j + 1;
|
3210 |
+
break;
|
3211 |
+
}
|
3212 |
+
}
|
3213 |
+
}
|
3214 |
+
}
|
3215 |
+
else {
|
3216 |
+
i = 0;
|
3217 |
+
}
|
3218 |
+
}
|
3219 |
+
else {
|
3220 |
+
d = 1;
|
3221 |
+
}
|
3222 |
+
if (option.eventItems && option.eventItems.length > 0) {
|
3223 |
+
if (i == option.eventItems.length) {
|
3224 |
+
option.eventItems.push(event);
|
3225 |
+
}
|
3226 |
+
else { option.eventItems.splice(i, d, event); }
|
3227 |
+
}
|
3228 |
+
else {
|
3229 |
+
option.eventItems = [event];
|
3230 |
+
}
|
3231 |
+
return i;
|
3232 |
+
}
|
3233 |
+
|
3234 |
+
|
3235 |
+
function ResizeView(config) {
|
3236 |
+
var _MH = document.documentElement.clientHeight;
|
3237 |
+
var _viewType = option.view;
|
3238 |
+
if (_viewType == "day" || _viewType == "week" || _viewType == "nDays") {
|
3239 |
+
var $dvwkcontaienr = $("#dvwkcontaienr"+config.thecontainer);
|
3240 |
+
var $dvtec = $("#dvtec"+config.thecontainer);
|
3241 |
+
if (($dvwkcontaienr.length == 0 || $dvtec.length == 0) && (option.rowsList=="" || (option.dayWithTime && option.view=="day")) ) {
|
3242 |
+
alert(i18n.dcmvcal.view_no_ready); return;
|
3243 |
+
}
|
3244 |
+
var dvwkH = $dvwkcontaienr.height() + 2;
|
3245 |
+
var calH = option.height - 8 - dvwkH;
|
3246 |
+
$dvtec.height(calH);
|
3247 |
+
if (typeof (option.scoll) == "undefined") {
|
3248 |
+
var currentday = new Date();
|
3249 |
+
var h = currentday.getHours();
|
3250 |
+
var m = currentday.getMinutes();
|
3251 |
+
var th = gP(h, m);
|
3252 |
+
var ch = $dvtec.attr("clientHeight");
|
3253 |
+
var sh = th - 0.5 * ch;
|
3254 |
+
var ph = $dvtec.attr("scrollHeight");
|
3255 |
+
if (sh < 0) sh = 0;
|
3256 |
+
if (sh > ph - ch) sh = ph - ch - 10 * (23 - h);
|
3257 |
+
$dvtec.attr("scrollTop", sh);
|
3258 |
+
}
|
3259 |
+
else {
|
3260 |
+
$dvtec.attr("scrollTop", option.scoll);
|
3261 |
+
}
|
3262 |
+
}
|
3263 |
+
else if (_viewType == "month") {
|
3264 |
+
//Resize GridContainer
|
3265 |
+
}
|
3266 |
+
}
|
3267 |
+
function initevents(viewtype) {
|
3268 |
+
if (viewtype == "week" || viewtype == "day" || viewtype == "nDays") {
|
3269 |
+
$("div.chip", gridcontainer).each(function(i) {
|
3270 |
+
var chip = $(this);
|
3271 |
+
chip.click(dayshow);
|
3272 |
+
if (option.showtooltipdwm_mouseover) {
|
3273 |
+
chip.mouseover(dayshow);
|
3274 |
+
//if (option.readonly == true) chip.mouseout(function() {try {$("#bbit-cs-buddle").dialog("close");}catch (e) {}});
|
3275 |
+
}
|
3276 |
+
if (chip.hasClass("drag")) {
|
3277 |
+
chip.mousedown(function(e) { dragStart.call(this, "dw3", e); e.stopPropagation(); });
|
3278 |
+
//resize
|
3279 |
+
chip.find("div.resizer").mousedown(function(e) {
|
3280 |
+
dragStart.call($(this).parent().parent(), "dw4", e); e.stopPropagation();
|
3281 |
+
});
|
3282 |
+
}
|
3283 |
+
else {
|
3284 |
+
chip.mousedown(function(e) {e.stopPropagation();})
|
3285 |
+
}
|
3286 |
+
});
|
3287 |
+
$("div.rb-o", gridcontainer).each(function(i) {
|
3288 |
+
var chip = $(this);
|
3289 |
+
chip.click(dayshow);
|
3290 |
+
if (option.showtooltipdwm_mouseover) {
|
3291 |
+
chip.mouseover(dayshow);
|
3292 |
+
//if (option.readonly == true) chip.mouseout(function() {try {$("#bbit-cs-buddle").dialog("close");}catch (e) {}});
|
3293 |
+
}
|
3294 |
+
if (chip.hasClass("drag") && (viewtype == "week" || viewtype == "nDays" ) ) {
|
3295 |
+
//drag;
|
3296 |
+
chip.mousedown(function(e) { dragStart.call(this, {dw5:"dw5",row:chip.attr("row")}, e); e.stopPropagation(); });
|
3297 |
+
}
|
3298 |
+
else {
|
3299 |
+
chip.mousedown(function(e) {e.stopPropagation();})
|
3300 |
+
}
|
3301 |
+
});
|
3302 |
+
if (option.readonly == false && option.userAdd) {
|
3303 |
+
$("td.tg-col", gridcontainer).each(function(i) {
|
3304 |
+
$(this).mousedown(function(e) { dragStart.call(this, "dw1", e); e.stopPropagation(); });
|
3305 |
+
});
|
3306 |
+
$("#weekViewAllDaywk"+option.thecontainer).mousedown(function(e) { dragStart.call(this, "dw2", e); e.stopPropagation(); });
|
3307 |
+
if ( !(option.rowsList=="" || (option.dayWithTime && option.view=="day")) )
|
3308 |
+
for (var i=0;i<option.rowsList.length;i++)
|
3309 |
+
$("#weekViewAllDaywk"+option.thecontainer+i).mousedown(function(e) { dragStart.call(this, "dw2", e); e.stopPropagation(); });
|
3310 |
+
}
|
3311 |
+
|
3312 |
+
if (viewtype == "week" || viewtype == "nDays" ) {
|
3313 |
+
$("#dvwkcontaienr"+option.thecontainer+" th.gcweekname").each(function(i) {
|
3314 |
+
$(this).click(weekormonthtoday);
|
3315 |
+
});
|
3316 |
+
}
|
3317 |
+
|
3318 |
+
|
3319 |
+
}
|
3320 |
+
else if (viewtype = "month") {
|
3321 |
+
|
3322 |
+
$("div.rb-o", gridcontainer).each(function(i) {
|
3323 |
+
var chip = $(this);
|
3324 |
+
chip.click(dayshow);
|
3325 |
+
if (option.showtooltipdwm_mouseover) {
|
3326 |
+
chip.mouseover(dayshow);
|
3327 |
+
//if (option.readonly == true) chip.mouseout(function() {try {$("#bbit-cs-buddle").dialog("close");}catch (e) {}});
|
3328 |
+
}
|
3329 |
+
if (chip.hasClass("drag")) {
|
3330 |
+
//drag;//aqui
|
3331 |
+
chip.mousedown(function(e) { dragStart.call(this, "m2", e); e.stopPropagation(); });
|
3332 |
+
}
|
3333 |
+
else {
|
3334 |
+
chip.mousedown(function(e) {e.stopPropagation();})
|
3335 |
+
}
|
3336 |
+
});
|
3337 |
+
$("td.st-more", gridcontainer).each(function(i) {
|
3338 |
+
|
3339 |
+
$(this).click(function(e) {
|
3340 |
+
moreshow.call(this, $(this).parent().parent().parent().parent()[0]); e.stopPropagation();
|
3341 |
+
}).mousedown(function() { e.stopPropagation(); });
|
3342 |
+
});
|
3343 |
+
if (option.readonly == false && option.userAdd) {
|
3344 |
+
$("#mvEventContainer"+option.thecontainer).mousedown(function(e) { dragStart.call(this, "m1", e); e.stopPropagation(); });
|
3345 |
+
}
|
3346 |
+
}
|
3347 |
+
|
3348 |
+
}
|
3349 |
+
function realsedragevent() {
|
3350 |
+
if (_dragevent) {
|
3351 |
+
_dragevent();
|
3352 |
+
_dragevent = null;
|
3353 |
+
}
|
3354 |
+
}
|
3355 |
+
function dragStart(type, e) {
|
3356 |
+
var obj = $(this);
|
3357 |
+
var source = e.srcElement || e.target;
|
3358 |
+
realsedragevent();
|
3359 |
+
var row = "";
|
3360 |
+
if (type.dw5=="dw5")
|
3361 |
+
{
|
3362 |
+
var row = type.row;
|
3363 |
+
type = "dw5";
|
3364 |
+
}
|
3365 |
+
switch (type) {
|
3366 |
+
case "dw1":
|
3367 |
+
_dragdata = { type: 1, target: obj, sx: e.pageX, sy: e.pageY };
|
3368 |
+
break;
|
3369 |
+
case "dw2":
|
3370 |
+
var w = obj.width();
|
3371 |
+
var h = obj.height();
|
3372 |
+
var offset = obj.offset();
|
3373 |
+
var left = offset.left;
|
3374 |
+
var top = offset.top;
|
3375 |
+
var l = option.view == "day" ? 1 : (option.view == "week" ? __VIEWWEEKDAYSTOTAL : option.numberOfDays);
|
3376 |
+
var py = w % l;
|
3377 |
+
var pw = (w / l);
|
3378 |
+
var xa = [];
|
3379 |
+
var ya = [];
|
3380 |
+
for (var i = 0; i < l; i++)
|
3381 |
+
xa.push({ s: parseInt(i * pw + left), e: parseInt((i + 1) * pw + left) });
|
3382 |
+
ya.push({ s: top, e: top + h });
|
3383 |
+
_dragdata = { type: 2, target: obj, sx: e.pageX, sy: e.pageY, pw: parseInt(pw), xa: xa, ya: ya, h: h };
|
3384 |
+
w = left = l = py = pw = xa = null;
|
3385 |
+
break;
|
3386 |
+
case "dw3":
|
3387 |
+
var evid = obj.parent().attr("id").replace("tgCol"+option.thecontainer, "");
|
3388 |
+
var p = obj.parent();
|
3389 |
+
var pos = p.offset();
|
3390 |
+
var w = p.width() + 10;
|
3391 |
+
var h = obj.height();
|
3392 |
+
var data = getdata(obj);
|
3393 |
+
_dragdata = { type: 4, target: obj, sx: e.pageX, sy: e.pageY,
|
3394 |
+
pXMin: pos.left, pXMax: pos.left + w, pw: w, h: h,
|
3395 |
+
cdi: parseInt(evid), fdi: parseInt(evid), data: data
|
3396 |
+
};
|
3397 |
+
break;
|
3398 |
+
case "dw4": //resize;
|
3399 |
+
var h = obj.height();
|
3400 |
+
var data = getdata(obj);
|
3401 |
+
_dragdata = { type: 5, target: obj, sx: e.pageX, sy: e.pageY, h: h, data: data };
|
3402 |
+
break;
|
3403 |
+
case "dw5":
|
3404 |
+
//try {
|
3405 |
+
|
3406 |
+
var con = $("#weekViewAllDaywk"+option.thecontainer+row);
|
3407 |
+
var w = con.width();
|
3408 |
+
var h = con.height();
|
3409 |
+
var offset = con.offset();
|
3410 |
+
var moffset = obj.offset();
|
3411 |
+
var left = offset.left;
|
3412 |
+
var top = offset.top;
|
3413 |
+
if (option.view == "week")
|
3414 |
+
var l = 7;//ht.push(" colSpan='",__VIEWWEEKDAYSTOTAL, "'"); //dayarrs.length
|
3415 |
+
else
|
3416 |
+
var l = option.numberOfDays; //ht.push(" colSpan='",option.numberOfDays, "'"); //dayarrs.length
|
3417 |
+
var py = w % l;
|
3418 |
+
var pw = parseInt(w / l);
|
3419 |
+
if (py > l / 2 + 1) {
|
3420 |
+
pw++;
|
3421 |
+
}
|
3422 |
+
var xa = [];
|
3423 |
+
var ya = [];
|
3424 |
+
var di = 0;
|
3425 |
+
for (var i = 0; i < l; i++) {
|
3426 |
+
xa.push({ s: i * pw + left, e: (i + 1) * pw + left });
|
3427 |
+
if (moffset.left >= xa[i].s && moffset.left < xa[i].e) {
|
3428 |
+
di = i;
|
3429 |
+
}
|
3430 |
+
}
|
3431 |
+
var fdi = { x: di, y: 0, di: di };
|
3432 |
+
ya.push({ s: top, e: top + h });
|
3433 |
+
var data = getdata(obj);
|
3434 |
+
var dp = DateDiff("d", data[2], data[3]) + 1;
|
3435 |
+
_dragdata = { type: 6, target: obj, sx: e.pageX, sy: e.pageY, data: data, xa: xa, ya: ya, fdi: fdi, h: h, dp: dp, pw: pw };
|
3436 |
+
//}catch (e) {}
|
3437 |
+
break;
|
3438 |
+
case "m1":
|
3439 |
+
var w = obj.width();
|
3440 |
+
var offset = obj.offset();
|
3441 |
+
var left = offset.left;
|
3442 |
+
var top = offset.top;
|
3443 |
+
var l = __VIEWWEEKDAYSTOTAL;
|
3444 |
+
var yl = obj.children().length;
|
3445 |
+
var py = w % l;
|
3446 |
+
var pw = parseInt(w / l);
|
3447 |
+
if (py > l / 2 + 1) {
|
3448 |
+
pw++;
|
3449 |
+
}
|
3450 |
+
var h = $("#mvrow"+option.thecontainer+"_0").height();
|
3451 |
+
/**var xa = [];
|
3452 |
+
var ya = [];
|
3453 |
+
for (var i = 0; i < l; i++) {
|
3454 |
+
xa.push({ s: i * pw + left, e: (i + 1) * pw + left });
|
3455 |
+
}*/
|
3456 |
+
var xa = [];
|
3457 |
+
var ya = [];
|
3458 |
+
for (var i = 0; i < l; i++) {
|
3459 |
+
xa.push({ s: i * pw + left, e: (i + 1) * pw + left });
|
3460 |
+
}
|
3461 |
+
for (var i = 0; i < yl; i++) {
|
3462 |
+
ya.push({ s: i * h + top, e: (i + 1) * h + top });
|
3463 |
+
}
|
3464 |
+
_dragdata = { type: 3, target: obj, sx: e.pageX, sy: e.pageY, pw: pw, xa: xa, ya: ya, h: h };
|
3465 |
+
break;
|
3466 |
+
case "m2":
|
3467 |
+
var row0 = $("#mvrow"+option.thecontainer+"_0");
|
3468 |
+
var row1 = $("#mvrow"+option.thecontainer+"_1");
|
3469 |
+
var w = row0.width();
|
3470 |
+
var offset = row0.offset();
|
3471 |
+
var diffset = row1.offset();
|
3472 |
+
var moffset = obj.offset();
|
3473 |
+
var h = diffset.top - offset.top;
|
3474 |
+
var left = offset.left;
|
3475 |
+
var top = offset.top;
|
3476 |
+
var l = 7;
|
3477 |
+
var yl = row0.parent().children().length;
|
3478 |
+
var py = w % l;
|
3479 |
+
var pw = parseInt(w / l);
|
3480 |
+
if (py > l / 2 + 1) {
|
3481 |
+
pw++;
|
3482 |
+
}
|
3483 |
+
var xa = [];
|
3484 |
+
var ya = [];
|
3485 |
+
var xi = 0;
|
3486 |
+
var yi = 0;
|
3487 |
+
for (var i = 0; i < l; i++) {
|
3488 |
+
xa.push({ s: i * pw + left, e: (i + 1) * pw + left });
|
3489 |
+
if (moffset.left >= xa[i].s && moffset.left < xa[i].e) {
|
3490 |
+
xi = i;
|
3491 |
+
}
|
3492 |
+
}
|
3493 |
+
for (var i = 0; i < yl; i++) {
|
3494 |
+
ya.push({ s: i * h + top, e: (i + 1) * h + top });
|
3495 |
+
if (moffset.top >= ya[i].s && moffset.top < ya[i].e) {
|
3496 |
+
yi = i;
|
3497 |
+
}
|
3498 |
+
}
|
3499 |
+
var fdi = { x: xi, y: yi, di: yi * 7 + xi };
|
3500 |
+
var data = getdata(obj);
|
3501 |
+
var dp = DateDiff("d", data[2], data[3]) + 1;
|
3502 |
+
_dragdata = { type: 7, target: obj, sx: e.pageX, sy: e.pageY, data: data, xa: xa, ya: ya, fdi: fdi, h: h, dp: dp, pw: pw };
|
3503 |
+
break;
|
3504 |
+
}
|
3505 |
+
$('body').noSelect();
|
3506 |
+
}
|
3507 |
+
function dragMove(e) {
|
3508 |
+
if (_dragdata) {
|
3509 |
+
//if (e.pageX < 0 || e.pageY < 0
|
3510 |
+
// || e.pageX > document.documentElement.clientWidth
|
3511 |
+
// || e.pageY >= document.documentElement.clientHeight) {
|
3512 |
+
// dragEnd(e);
|
3513 |
+
// return false;
|
3514 |
+
//}
|
3515 |
+
var d = _dragdata;
|
3516 |
+
switch (d.type) {
|
3517 |
+
case 1:
|
3518 |
+
var sy = d.sy;
|
3519 |
+
var y = e.pageY;
|
3520 |
+
var diffy = y - sy;
|
3521 |
+
if (diffy > (option.cellheight/4) /*11*/ || diffy < -1*(option.cellheight/4) /*11*/ || d.cpwrap) {
|
3522 |
+
if (diffy == 0) { diffy =(option.cellheight/2) /*21*/; }
|
3523 |
+
var dy = diffy % (option.cellheight/2) /*21*/;
|
3524 |
+
if (dy != 0) {
|
3525 |
+
diffy = dy > 0 ? diffy + (option.cellheight/2) /*21*/ - dy : diffy - (option.cellheight/2) /*21*/ - dy;
|
3526 |
+
y = d.sy + diffy;
|
3527 |
+
if (diffy < 0) {
|
3528 |
+
sy = sy + (option.cellheight/2) /*21*/;
|
3529 |
+
}
|
3530 |
+
}
|
3531 |
+
if (!d.tp) {
|
3532 |
+
d.tp = $(d.target).offset().top;
|
3533 |
+
}
|
3534 |
+
var gh = gH(sy, y, d.tp);
|
3535 |
+
var ny = gP(gh.sh, gh.sm);
|
3536 |
+
var tempdata;
|
3537 |
+
if (!d.cpwrap) {
|
3538 |
+
tempdata = buildtempdayevent(gh.sh, gh.sm, gh.eh, gh.em, gh.h);
|
3539 |
+
var cpwrap = $("<div class='ca-evpi drag-chip-wrapper' style='top:" + ny + "px'/>").html(tempdata);
|
3540 |
+
$(d.target).find("div.tg-col-overlaywrapper").append(cpwrap);
|
3541 |
+
d.cpwrap = cpwrap;
|
3542 |
+
}
|
3543 |
+
else {
|
3544 |
+
if (d.cgh.sh != gh.sh || d.cgh.eh != gh.eh || d.cgh.sm != gh.sm || d.cgh.em != gh.em) {
|
3545 |
+
tempdata = buildtempdayevent(gh.sh, gh.sm, gh.eh, gh.em, gh.h);
|
3546 |
+
d.cpwrap.css("top", ny + "px").html(tempdata);
|
3547 |
+
}
|
3548 |
+
}
|
3549 |
+
d.cgh = gh;
|
3550 |
+
}
|
3551 |
+
break;
|
3552 |
+
case 2:
|
3553 |
+
var sx = d.sx;
|
3554 |
+
var x = e.pageX;
|
3555 |
+
var diffx = x - sx;
|
3556 |
+
if (diffx > 5 || diffx < -5 || d.lasso) {
|
3557 |
+
if (!d.lasso) {
|
3558 |
+
d.lasso = $("<div style='display: block' class='drag-lasso-container'/>");
|
3559 |
+
$(document.body).append(d.lasso);
|
3560 |
+
}
|
3561 |
+
if (!d.sdi) {
|
3562 |
+
d.sdi = getdi(d.xa, d.ya, sx, d.sy);
|
3563 |
+
}
|
3564 |
+
var ndi = getdi(d.xa, d.ya, x, e.pageY);
|
3565 |
+
if (!d.fdi || d.fdi.di != ndi.di) {
|
3566 |
+
addlasso(d.lasso, d.sdi, ndi, d.xa, d.ya, d.h);
|
3567 |
+
}
|
3568 |
+
d.fdi = ndi;
|
3569 |
+
}
|
3570 |
+
break;
|
3571 |
+
case 3:
|
3572 |
+
var sx = d.sx;
|
3573 |
+
var x = e.pageX;
|
3574 |
+
var sy = d.sy;
|
3575 |
+
var y = e.pageY;
|
3576 |
+
var diffx = x - sx;
|
3577 |
+
var diffy = y - sy;
|
3578 |
+
if (diffx > 5 || diffx < -5 || diffy < -5 || diffy > 5 || d.lasso) {
|
3579 |
+
if (!d.lasso) {
|
3580 |
+
d.lasso = $("<div style='display: block' class='drag-lasso-container'/>");
|
3581 |
+
$(document.body).append(d.lasso);
|
3582 |
+
}
|
3583 |
+
if (!d.sdi) {
|
3584 |
+
d.sdi = getdi(d.xa, d.ya, sx, sy);
|
3585 |
+
}
|
3586 |
+
var ndi = getdi(d.xa, d.ya, x, y);
|
3587 |
+
if (!d.fdi || d.fdi.di != ndi.di) {
|
3588 |
+
addlasso(d.lasso, d.sdi, ndi, d.xa, d.ya, d.h);
|
3589 |
+
}
|
3590 |
+
d.fdi = ndi;
|
3591 |
+
}
|
3592 |
+
break;
|
3593 |
+
case 4:
|
3594 |
+
var data = d.data;
|
3595 |
+
if (data != null && data[8] == 1) {
|
3596 |
+
var sx = d.sx;
|
3597 |
+
var x = e.pageX;
|
3598 |
+
var sy = d.sy;
|
3599 |
+
var y = e.pageY;
|
3600 |
+
var diffx = x - sx;
|
3601 |
+
var diffy = y - sy;
|
3602 |
+
if (diffx > 5 || diffx < -5 || diffy > 5 || diffy < -5 || d.cpwrap) {
|
3603 |
+
var gh, ny, tempdata;
|
3604 |
+
if (!d.cpwrap) {
|
3605 |
+
gh = { sh: data[2].getHours(),
|
3606 |
+
sm: data[2].getMinutes(),
|
3607 |
+
eh: data[3].getHours(),
|
3608 |
+
em: data[3].getMinutes(),
|
3609 |
+
h: d.h
|
3610 |
+
};
|
3611 |
+
d.target.hide();
|
3612 |
+
ny = gP(gh.sh, gh.sm);
|
3613 |
+
d.top = ny;
|
3614 |
+
tempdata = buildtempdayevent(gh.sh, gh.sm, gh.eh, gh.em, gh.h, data[1], false, false, data[7]);
|
3615 |
+
var cpwrap = $("<div class='ca-evpi drag-chip-wrapper' style='top:" + ny + "px'/>").html(tempdata);
|
3616 |
+
var evid = d.target.parent().attr("id").replace("tgCol"+option.thecontainer, "#tgOver"+option.thecontainer);
|
3617 |
+
$(evid).append(cpwrap);
|
3618 |
+
d.cpwrap = cpwrap;
|
3619 |
+
d.ny = ny;
|
3620 |
+
}
|
3621 |
+
else {
|
3622 |
+
var pd = 0;
|
3623 |
+
if (x < d.pXMin) {
|
3624 |
+
pd = -1;
|
3625 |
+
}
|
3626 |
+
else if (x > d.pXMax) {
|
3627 |
+
pd = 1;
|
3628 |
+
}
|
3629 |
+
if (pd != 0) {
|
3630 |
+
|
3631 |
+
d.cdi = d.cdi + pd;
|
3632 |
+
var ov = $("#tgOver"+option.thecontainer + d.cdi);
|
3633 |
+
if (ov.length == 1) {
|
3634 |
+
d.pXMin = d.pXMin + d.pw * pd;
|
3635 |
+
d.pXMax = d.pXMax + d.pw * pd;
|
3636 |
+
ov.append(d.cpwrap);
|
3637 |
+
}
|
3638 |
+
else {
|
3639 |
+
d.cdi = d.cdi - pd;
|
3640 |
+
}
|
3641 |
+
}
|
3642 |
+
ny = d.top + diffy;
|
3643 |
+
var pny = ny % (option.cellheight/2) /*21*/;
|
3644 |
+
if (pny != 0) {
|
3645 |
+
ny = ny - pny;
|
3646 |
+
}
|
3647 |
+
if (d.ny != ny) {
|
3648 |
+
//log.info("ny=" + ny);
|
3649 |
+
gh = gW(ny, ny + d.h);
|
3650 |
+
//log.info("sh=" + gh.sh + ",sm=" + gh.sm);
|
3651 |
+
tempdata = buildtempdayevent(gh.sh, gh.sm, gh.eh, gh.em, gh.h, data[1], false, false, data[7]);
|
3652 |
+
d.cpwrap.css("top", ny + "px").html(tempdata);
|
3653 |
+
}
|
3654 |
+
d.ny = ny;
|
3655 |
+
}
|
3656 |
+
}
|
3657 |
+
}
|
3658 |
+
|
3659 |
+
break;
|
3660 |
+
case 5:
|
3661 |
+
var data = d.data;
|
3662 |
+
if (data != null && data[8] == 1) {
|
3663 |
+
var sy = d.sy;
|
3664 |
+
var y = e.pageY;
|
3665 |
+
var diffy = y - sy;
|
3666 |
+
if (diffy != 0 || d.cpwrap) {
|
3667 |
+
var gh, ny, tempdata;
|
3668 |
+
if (!d.cpwrap) {
|
3669 |
+
gh = { sh: data[2].getHours(),
|
3670 |
+
sm: data[2].getMinutes(),
|
3671 |
+
eh: data[3].getHours(),
|
3672 |
+
em: data[3].getMinutes(),
|
3673 |
+
h: d.h
|
3674 |
+
};
|
3675 |
+
d.target.hide();
|
3676 |
+
ny = gP(gh.sh, gh.sm);
|
3677 |
+
d.top = ny;
|
3678 |
+
tempdata = buildtempdayevent(gh.sh, gh.sm, gh.eh, gh.em, gh.h, data[1], "100%", true, data[7]);
|
3679 |
+
var cpwrap = $("<div class='ca-evpi drag-chip-wrapper' style='top:" + ny + "px'/>").html(tempdata);
|
3680 |
+
var evid = d.target.parent().attr("id").replace("tgCol"+option.thecontainer, "#tgOver"+option.thecontainer);
|
3681 |
+
$(evid).append(cpwrap);
|
3682 |
+
d.cpwrap = cpwrap;
|
3683 |
+
}
|
3684 |
+
else {
|
3685 |
+
nh = d.h + diffy;
|
3686 |
+
var pnh = nh % (option.cellheight/2) /*21*/;
|
3687 |
+
nh = pnh > 1 ? nh - pnh + (option.cellheight/2) /*21*/ : nh - pnh;
|
3688 |
+
if (d.nh != nh) {
|
3689 |
+
var sp = gP(data[2].getHours(), data[2].getMinutes());
|
3690 |
+
var ep = sp + nh;
|
3691 |
+
gh = gW(d.top, d.top + nh);
|
3692 |
+
tempdata = buildtempdayevent(gh.sh, gh.sm, gh.eh, gh.em, gh.h, data[1], "100%", true, data[7]);
|
3693 |
+
d.cpwrap.html(tempdata);
|
3694 |
+
|
3695 |
+
}
|
3696 |
+
d.nh = nh;
|
3697 |
+
}
|
3698 |
+
}
|
3699 |
+
}
|
3700 |
+
break;
|
3701 |
+
case 6:
|
3702 |
+
var sx = d.sx;
|
3703 |
+
var x = e.pageX;
|
3704 |
+
var y = e.pageY;
|
3705 |
+
var diffx = x - sx;
|
3706 |
+
if (diffx > 5 || diffx < -5 || d.lasso) {
|
3707 |
+
if (!d.lasso) {
|
3708 |
+
var w1 = d.dp > 1 ? (d.pw - 4) * 1.5 : (d.pw - 4);
|
3709 |
+
var cp = d.target.clone();
|
3710 |
+
if (d.dp > 1) {
|
3711 |
+
cp.find("div.rb-i>span").prepend("(" + d.dp + " " + i18n.dcmvcal.day_plural + ") ");
|
3712 |
+
}
|
3713 |
+
var cpwrap = $("<div class='drag-event st-contents' style='width:" + w1 + "px'/>").append(cp).appendTo(document.body);
|
3714 |
+
d.cpwrap = cpwrap;
|
3715 |
+
d.lasso = $("<div style='display: block' class='drag-lasso-container'/>");
|
3716 |
+
$(document.body).append(d.lasso);
|
3717 |
+
cp = cpwrap = null;
|
3718 |
+
}
|
3719 |
+
fixcppostion(d.cpwrap, e, d.xa, d.ya);
|
3720 |
+
var ndi = getdi(d.xa, d.ya, x, e.pageY);
|
3721 |
+
if (!d.cdi || d.cdi.di != ndi.di) {
|
3722 |
+
addlasso(d.lasso, ndi, { x: ndi.x, y: ndi.y, di: ndi.di + d.dp - 1 }, d.xa, d.ya, d.h);
|
3723 |
+
}
|
3724 |
+
d.cdi = ndi;
|
3725 |
+
}
|
3726 |
+
break;
|
3727 |
+
case 7:
|
3728 |
+
var sx = d.sx;
|
3729 |
+
var sy = d.sy;
|
3730 |
+
var x = e.pageX;
|
3731 |
+
var y = e.pageY;
|
3732 |
+
var diffx = x - sx;
|
3733 |
+
var diffy = y - sy;
|
3734 |
+
if (diffx > 5 || diffx < -5 || diffy > 5 || diffy < -5 || d.lasso) {
|
3735 |
+
if (!d.lasso) {
|
3736 |
+
var w1 = d.dp > 1 ? (d.pw - 4) * 1.5 : (d.pw - 4);
|
3737 |
+
var cp = d.target.clone();
|
3738 |
+
if (d.dp > 1) {
|
3739 |
+
cp.find("div.rb-i>span").prepend("(" + d.dp + " " + i18n.dcmvcal.day_plural + ") ");
|
3740 |
+
}
|
3741 |
+
var cpwrap = $("<div class='drag-event st-contents' style='width:" + w1 + "px'/>").append(cp).appendTo(document.body);
|
3742 |
+
d.cpwrap = cpwrap;
|
3743 |
+
d.lasso = $("<div style='display: block' class='drag-lasso-container'/>");
|
3744 |
+
$(document.body).append(d.lasso);
|
3745 |
+
cp = cpwrap = null;
|
3746 |
+
}
|
3747 |
+
fixcppostion(d.cpwrap, e, d.xa, d.ya);
|
3748 |
+
var ndi = getdi(d.xa, d.ya, x, e.pageY);
|
3749 |
+
if (!d.cdi || d.cdi.di != ndi.di) {
|
3750 |
+
addlasso(d.lasso, ndi, { x: ndi.x, y: ndi.y, di: ndi.di + d.dp - 1 }, d.xa, d.ya, d.h);
|
3751 |
+
}
|
3752 |
+
d.cdi = ndi;
|
3753 |
+
}
|
3754 |
+
break;
|
3755 |
+
}
|
3756 |
+
}
|
3757 |
+
e.stopPropagation();
|
3758 |
+
}
|
3759 |
+
function dragEnd(e) {
|
3760 |
+
if (_dragdata) {
|
3761 |
+
|
3762 |
+
var d = _dragdata;
|
3763 |
+
switch (d.type) {
|
3764 |
+
case 1: //day view
|
3765 |
+
var wrapid = new Date().getTime();
|
3766 |
+
tp = d.target.offset().top;
|
3767 |
+
if (!d.cpwrap) {
|
3768 |
+
var gh = gH(d.sy, d.sy + option.cellheight, tp);
|
3769 |
+
var ny = gP(gh.sh, gh.sm);
|
3770 |
+
var tempdata = buildtempdayevent(gh.sh, gh.sm, gh.eh, gh.em, gh.h);
|
3771 |
+
d.cpwrap = $("<div class='ca-evpi drag-chip-wrapper' style='top:" + ny + "px'/>").html(tempdata);
|
3772 |
+
$(d.target).find("div.tg-col-overlaywrapper").append(d.cpwrap);
|
3773 |
+
d.cgh = gh;
|
3774 |
+
}
|
3775 |
+
|
3776 |
+
var pos = d.cpwrap.offset();
|
3777 |
+
pos.left = pos.left + 30;
|
3778 |
+
d.cpwrap.attr("id", wrapid);
|
3779 |
+
var start = str_MdyyyyHHmm_todate(d.target.attr("abbr") + " " + d.cgh.sh + ":" + d.cgh.sm);
|
3780 |
+
var end = str_MdyyyyHHmm_todate(d.target.attr("abbr") + " " + d.cgh.eh + ":" + d.cgh.em);
|
3781 |
+
_dragevent = function() { $("#" + wrapid).remove(); $("#bbit-cal-buddle").dialog( "close" ); };
|
3782 |
+
try {pos.col = d.cpwrap.parent().parent().attr("col");}catch (e) {}
|
3783 |
+
quickadd(start, end, false, pos);
|
3784 |
+
break;
|
3785 |
+
case 2: //week view
|
3786 |
+
case 3: //month view
|
3787 |
+
var source = e.srcElement || e.target;
|
3788 |
+
var lassoid = new Date().getTime();
|
3789 |
+
if (!d.lasso) {
|
3790 |
+
if ($(source).hasClass("monthdayshow"))
|
3791 |
+
{
|
3792 |
+
weekormonthtoday.call($(source).parent()[0],e);
|
3793 |
+
break;
|
3794 |
+
}
|
3795 |
+
d.fdi = d.sdi = getdi(d.xa, d.ya, d.sx, d.sy);
|
3796 |
+
d.lasso = $("<div style='display: block' class='drag-lasso-container'/>");
|
3797 |
+
$(document.body).append(d.lasso);
|
3798 |
+
addlasso(d.lasso, d.sdi, d.fdi, d.xa, d.ya, d.h);
|
3799 |
+
}
|
3800 |
+
d.lasso.attr("id", lassoid);
|
3801 |
+
var si = Math.min(d.fdi.di, d.sdi.di);
|
3802 |
+
var ei = Math.max(d.fdi.di, d.sdi.di);
|
3803 |
+
var firstday = option.vstart;
|
3804 |
+
|
3805 |
+
var zz = 0;
|
3806 |
+
for (var p=0; (p<=si);)
|
3807 |
+
{
|
3808 |
+
var x = DateAdd("d", zz, firstday);
|
3809 |
+
p += __VIEWWEEKDAYS[x.getDay()];
|
3810 |
+
zz++;
|
3811 |
+
}
|
3812 |
+
zz--;
|
3813 |
+
si = zz;
|
3814 |
+
ei = zz;
|
3815 |
+
|
3816 |
+
var start = DateAdd("d", si, firstday);
|
3817 |
+
var end = DateAdd("d", ei, firstday);
|
3818 |
+
_dragevent = function() { $("#" + lassoid).remove(); };
|
3819 |
+
if (!$(source).hasClass("st-more")) quickadd(start, end, true, { left: e.pageX, top: e.pageY });
|
3820 |
+
break;
|
3821 |
+
case 4: // event moving
|
3822 |
+
if (d.cpwrap) {
|
3823 |
+
var start = DateAdd("d", d.cdi, option.vstart);
|
3824 |
+
var end = DateAdd("d", d.cdi, option.vstart);
|
3825 |
+
var gh = gW(d.ny, d.ny + d.h);
|
3826 |
+
start.setHours(gh.sh, gh.sm);
|
3827 |
+
end.setHours(gh.eh, gh.em);
|
3828 |
+
if (start.getTime() == d.data[2].getTime() && end.getTime() == d.data[3].getTime()) {
|
3829 |
+
d.cpwrap.remove();
|
3830 |
+
d.target.show();
|
3831 |
+
}
|
3832 |
+
else {
|
3833 |
+
dayupdate(d.data, start, end);
|
3834 |
+
}
|
3835 |
+
}
|
3836 |
+
break;
|
3837 |
+
case 5: //Resize
|
3838 |
+
if (d.cpwrap) {
|
3839 |
+
var start = new Date(d.data[2].toString());
|
3840 |
+
var end = new Date(d.data[3].toString());
|
3841 |
+
var gh = gW(d.top, d.top + nh);
|
3842 |
+
start.setHours(gh.sh, gh.sm);
|
3843 |
+
end.setHours(gh.eh, gh.em);
|
3844 |
+
|
3845 |
+
if (start.getTime() == d.data[2].getTime() && end.getTime() == d.data[3].getTime()) {
|
3846 |
+
d.cpwrap.remove();
|
3847 |
+
d.target.show();
|
3848 |
+
}
|
3849 |
+
else {
|
3850 |
+
dayupdate(d.data, start, end);
|
3851 |
+
}
|
3852 |
+
}
|
3853 |
+
break;
|
3854 |
+
case 6:
|
3855 |
+
case 7:
|
3856 |
+
if (d.lasso) {
|
3857 |
+
d.cpwrap.remove();
|
3858 |
+
d.lasso.remove();
|
3859 |
+
var start = new Date(d.data[2].toString());
|
3860 |
+
var end = new Date(d.data[3].toString());
|
3861 |
+
var currrentdate = DateAdd("d", d.cdi.di, option.vstart);
|
3862 |
+
var diff = DateDiff("d", start, currrentdate);
|
3863 |
+
start = DateAdd("d", diff, start);
|
3864 |
+
end = DateAdd("d", diff, end);
|
3865 |
+
if (start.getTime() != d.data[2].getTime() || end.getTime() != d.data[3].getTime()) {
|
3866 |
+
dayupdate(d.data, start, end);
|
3867 |
+
}
|
3868 |
+
}
|
3869 |
+
break;
|
3870 |
+
}
|
3871 |
+
d = _dragdata = null;
|
3872 |
+
$('body').noSelect(false);
|
3873 |
+
e.stopPropagation();
|
3874 |
+
}
|
3875 |
+
}
|
3876 |
+
function getdi(xa, ya, x, y) {
|
3877 |
+
var ty = 0;
|
3878 |
+
var tx = 0;
|
3879 |
+
var lx = 0;
|
3880 |
+
var ly = 0;
|
3881 |
+
if (xa && xa.length != 0) {
|
3882 |
+
lx = xa.length;
|
3883 |
+
if (x >= xa[lx - 1].e) {
|
3884 |
+
tx = lx - 1;
|
3885 |
+
}
|
3886 |
+
else {
|
3887 |
+
for (var i = 0; i < lx; i++) {
|
3888 |
+
if (x > xa[i].s && x <= xa[i].e) {
|
3889 |
+
tx = i;
|
3890 |
+
break;
|
3891 |
+
}
|
3892 |
+
}
|
3893 |
+
}
|
3894 |
+
}
|
3895 |
+
if (ya && ya.length != 0) {
|
3896 |
+
ly = ya.length;
|
3897 |
+
if (y >= ya[ly - 1].e) {
|
3898 |
+
ty = ly - 1;
|
3899 |
+
}
|
3900 |
+
else {
|
3901 |
+
for (var j = 0; j < ly; j++) {
|
3902 |
+
if (y > ya[j].s && y <= ya[j].e) {
|
3903 |
+
ty = j;
|
3904 |
+
break;
|
3905 |
+
}
|
3906 |
+
}
|
3907 |
+
}
|
3908 |
+
}
|
3909 |
+
return { x: tx, y: ty, di: ty * lx + tx };
|
3910 |
+
}
|
3911 |
+
function addlasso(lasso, sdi, edi, xa, ya, height) {
|
3912 |
+
var diff = sdi.di > edi.di ? sdi.di - edi.di : edi.di - sdi.di;
|
3913 |
+
diff++;
|
3914 |
+
var sp = sdi.di > edi.di ? edi : sdi;
|
3915 |
+
var ep = sdi.di > edi.di ? sdi : edi;
|
3916 |
+
var l = xa.length > 0 ? xa.length : 1;
|
3917 |
+
var h = ya.length > 0 ? ya.length : 1;
|
3918 |
+
var play = [];
|
3919 |
+
var width = xa[0].e - xa[0].s+1;
|
3920 |
+
var i = sp.x;
|
3921 |
+
var j = sp.y;
|
3922 |
+
var max = Math.min(document.documentElement.clientWidth, xa[l - 1].e) - 2;
|
3923 |
+
|
3924 |
+
while (j < h && diff > 0) {
|
3925 |
+
var left = xa[i].s;
|
3926 |
+
var d = i + diff > l ? l - i : diff;
|
3927 |
+
var wid = width * d;
|
3928 |
+
//while (left + wid >= max) {
|
3929 |
+
// wid--;
|
3930 |
+
//}
|
3931 |
+
play.push(Tp(__LASSOTEMP, { left: left+1, top: ya[j].s+4, height: height, width: wid }));
|
3932 |
+
i = 0;
|
3933 |
+
diff = diff - d;
|
3934 |
+
j++;
|
3935 |
+
}
|
3936 |
+
lasso.html(play.join(""));
|
3937 |
+
}
|
3938 |
+
function fixcppostion(cpwrap, e, xa, ya) {
|
3939 |
+
var x = e.pageX - 6;
|
3940 |
+
var y = e.pageY - 4;
|
3941 |
+
var w = cpwrap.width();
|
3942 |
+
var h = (option.cellheight/2) /*21*/;
|
3943 |
+
var lmin = xa[0].s + 6;
|
3944 |
+
var tmin = ya[0].s + 4;
|
3945 |
+
var lmax = xa[xa.length - 1].e - w - 2;
|
3946 |
+
var tmax = ya[ya.length - 1].e - h - 2;
|
3947 |
+
if (x > lmax) {
|
3948 |
+
x = lmax;
|
3949 |
+
}
|
3950 |
+
if (x <= lmin) {
|
3951 |
+
x = lmin + 1;
|
3952 |
+
}
|
3953 |
+
if (y <= tmin) {
|
3954 |
+
y = tmin + 1;
|
3955 |
+
}
|
3956 |
+
if (y > tmax) {
|
3957 |
+
y = tmax;
|
3958 |
+
}
|
3959 |
+
cpwrap.css({ left: x, top: y });
|
3960 |
+
}
|
3961 |
+
$(document)
|
3962 |
+
.mousemove(dragMove)
|
3963 |
+
.mouseup(dragEnd);
|
3964 |
+
//.mouseout(dragEnd);
|
3965 |
+
|
3966 |
+
var c = {
|
3967 |
+
sv: function(view) { //switch view
|
3968 |
+
if (view == option.view) {
|
3969 |
+
return;
|
3970 |
+
}
|
3971 |
+
clearcontainer();
|
3972 |
+
option.view = view;
|
3973 |
+
if (option.view=="list")
|
3974 |
+
{
|
3975 |
+
option.eventItems = [];
|
3976 |
+
option.lastdate = "";
|
3977 |
+
option.currentlist = {dend:"",idend:0};
|
3978 |
+
option.cachepages = new Array();
|
3979 |
+
}
|
3980 |
+
render();
|
3981 |
+
dochange();
|
3982 |
+
},
|
3983 |
+
rf2: function() {
|
3984 |
+
option.newWidthGroup = 0;
|
3985 |
+
render();
|
3986 |
+
},
|
3987 |
+
rf: function() {
|
3988 |
+
populate();
|
3989 |
+
|
3990 |
+
},
|
3991 |
+
gt: function(d) {
|
3992 |
+
if (!d) {
|
3993 |
+
d = new Date();
|
3994 |
+
}
|
3995 |
+
option.showday = d;
|
3996 |
+
render();
|
3997 |
+
dochange();
|
3998 |
+
},
|
3999 |
+
|
4000 |
+
pv: function() {
|
4001 |
+
switch (option.view) {
|
4002 |
+
case "day":
|
4003 |
+
option.showday = DateAdd("d", -1, option.showday);
|
4004 |
+
break;
|
4005 |
+
case "week":
|
4006 |
+
option.showday = DateAdd("w", -1, option.showday);
|
4007 |
+
break;
|
4008 |
+
case "nDays":
|
4009 |
+
option.showday = DateAdd("d",(-1 * option.numberOfDays), option.showday);
|
4010 |
+
break;
|
4011 |
+
case "list":
|
4012 |
+
option.page--;
|
4013 |
+
break;
|
4014 |
+
case "month":
|
4015 |
+
case "nMonth":
|
4016 |
+
option.showday = DateAdd("m", -1, option.showday);
|
4017 |
+
break;
|
4018 |
+
}
|
4019 |
+
render();
|
4020 |
+
if (option.view!="list") dochange();
|
4021 |
+
},
|
4022 |
+
nt: function() {
|
4023 |
+
switch (option.view) {
|
4024 |
+
case "day":
|
4025 |
+
option.showday = DateAdd("d", 1, option.showday);
|
4026 |
+
break;
|
4027 |
+
case "week":
|
4028 |
+
option.showday = DateAdd("w", 1, option.showday);
|
4029 |
+
break;
|
4030 |
+
case "nDays":
|
4031 |
+
option.showday = DateAdd("d", option.numberOfDays, option.showday);
|
4032 |
+
break;
|
4033 |
+
case "list":
|
4034 |
+
option.lastdate = option.currentlist.dend;
|
4035 |
+
option.page++;
|
4036 |
+
break;
|
4037 |
+
case "month":
|
4038 |
+
case "nMonth":
|
4039 |
+
var od = option.showday.getDate();
|
4040 |
+
option.showday = DateAdd("m", 1, option.showday);
|
4041 |
+
var nd = option.showday.getDate();
|
4042 |
+
if(od !=nd) //we go to the next month
|
4043 |
+
{
|
4044 |
+
option.showday= DateAdd("d", 0-nd, option.showday); //last day of last month
|
4045 |
+
}
|
4046 |
+
break;
|
4047 |
+
}
|
4048 |
+
if (option.view!="list" || (option.view=="list" && (option.cachepages.length>option.page))) render();
|
4049 |
+
if (option.view!="list" || (option.view=="list" && (option.cachepages.length<=option.page))) dochange();
|
4050 |
+
},
|
4051 |
+
go: function() {
|
4052 |
+
return option;
|
4053 |
+
},
|
4054 |
+
so: function(p) {
|
4055 |
+
option = $.extend(option, p);
|
4056 |
+
}
|
4057 |
+
};
|
4058 |
+
this[0].bcal = c;
|
4059 |
+
return this;
|
4060 |
+
};
|
4061 |
+
|
4062 |
+
/**
|
4063 |
+
* @description {Method} swtichView To switch to another view.
|
4064 |
+
* @param {String} view View name, one of 'day', 'week', 'month'.
|
4065 |
+
*/
|
4066 |
+
$.fn.swtichView = function(view) {
|
4067 |
+
$(".mv_dlg").remove();
|
4068 |
+
return this.each(function() {
|
4069 |
+
if (this.bcal) {
|
4070 |
+
this.bcal.sv(view);
|
4071 |
+
}
|
4072 |
+
})
|
4073 |
+
|
4074 |
+
};
|
4075 |
+
|
4076 |
+
/**
|
4077 |
+
* @description {Method} reload To reload event of current time range.
|
4078 |
+
*/
|
4079 |
+
$.fn.reload = function() {
|
4080 |
+
return this.each(function() {
|
4081 |
+
if (this.bcal) {
|
4082 |
+
this.bcal.rf();
|
4083 |
+
}
|
4084 |
+
})
|
4085 |
+
};
|
4086 |
+
$.fn.reload2 = function() {
|
4087 |
+
return this.each(function() {
|
4088 |
+
if (this.bcal) {
|
4089 |
+
this.bcal.rf2();
|
4090 |
+
}
|
4091 |
+
})
|
4092 |
+
};
|
4093 |
+
|
4094 |
+
/**
|
4095 |
+
* @description {Method} gotoDate To go to a range containing date.
|
4096 |
+
* If view is week, it will go to a week containing date.
|
4097 |
+
* If view is month, it will got to a month containing date.
|
4098 |
+
* @param {Date} date. Date to go.
|
4099 |
+
*/
|
4100 |
+
$.fn.gotoDate = function(d) {
|
4101 |
+
return this.each(function() {
|
4102 |
+
if (this.bcal) {
|
4103 |
+
this.bcal.gt(d);
|
4104 |
+
}
|
4105 |
+
})
|
4106 |
+
};
|
4107 |
+
|
4108 |
+
/**
|
4109 |
+
* @description {Method} previousRange To go to previous date range.
|
4110 |
+
* If view is week, it will go to previous week.
|
4111 |
+
* If view is month, it will got to previous month.
|
4112 |
+
*/
|
4113 |
+
$.fn.previousRange = function() {
|
4114 |
+
return this.each(function() {
|
4115 |
+
if (this.bcal) {
|
4116 |
+
this.bcal.pv();
|
4117 |
+
}
|
4118 |
+
})
|
4119 |
+
};
|
4120 |
+
|
4121 |
+
/**
|
4122 |
+
* @description {Method} nextRange To go to next date range.
|
4123 |
+
* If view is week, it will go to next week.
|
4124 |
+
* If view is month, it will got to next month.
|
4125 |
+
*/
|
4126 |
+
$.fn.nextRange = function() {
|
4127 |
+
return this.each(function() {
|
4128 |
+
if (this.bcal) {
|
4129 |
+
this.bcal.nt();
|
4130 |
+
}
|
4131 |
+
})
|
4132 |
+
};
|
4133 |
+
|
4134 |
+
|
4135 |
+
$.fn.BcalGetOp = function() {
|
4136 |
+
if (this[0].bcal) {
|
4137 |
+
return this[0].bcal.go();
|
4138 |
+
}
|
4139 |
+
return null;
|
4140 |
+
};
|
4141 |
+
|
4142 |
+
|
4143 |
+
$.fn.BcalSetOp = function(p) {
|
4144 |
+
if (this[0].bcal) {
|
4145 |
+
return this[0].bcal.so(p);
|
4146 |
+
}
|
4147 |
+
};
|
4148 |
+
|
4149 |
+
})(jQuery);
|
DC_MultiViewCal/src/Plugins/jquery.cleditor.css
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.cleditorMain {border:1px solid #999; padding:0 1px 1px; background-color:white}
|
2 |
+
.cleditorMain iframe {border:none; margin:0; padding:0}
|
3 |
+
.cleditorMain textarea {border:none; margin:0; padding:0; overflow-y:scroll; font:10pt Arial,Verdana; resize:none; outline:none /* webkit grip focus */}
|
4 |
+
.cleditorToolbar {background: url('images/toolbar.gif') repeat}
|
5 |
+
.cleditorGroup {float:left; height:26px}
|
6 |
+
.cleditorButton {float:left; width:24px; height:24px; margin:1px 0 1px 0; background: url('images/buttons.gif')}
|
7 |
+
.cleditorDisabled {opacity:0.3; filter:alpha(opacity=30)}
|
8 |
+
.cleditorDivider {float:left; width:1px; height:23px; margin:1px 0 1px 0; background:#CCC}
|
9 |
+
.cleditorPopup {border:solid 1px #999; background-color:white; color:#333333; position:absolute; font:10pt Arial,Verdana; cursor:default; z-index:10000}
|
10 |
+
.cleditorList div {padding:2px 4px 2px 4px}
|
11 |
+
.cleditorList p,
|
12 |
+
.cleditorList h1,
|
13 |
+
.cleditorList h2,
|
14 |
+
.cleditorList h3,
|
15 |
+
.cleditorList h4,
|
16 |
+
.cleditorList h5,
|
17 |
+
.cleditorList h6,
|
18 |
+
.cleditorList font {padding:0; margin:0; background-color:Transparent}
|
19 |
+
.cleditorColor {width:150px; padding:1px 0 0 1px}
|
20 |
+
.cleditorColor div {float:left; width:14px; height:14px; margin:0 1px 1px 0}
|
21 |
+
.cleditorPrompt {background-color:#F6F7F9; padding:4px; font-size:8.5pt}
|
22 |
+
.cleditorPrompt input,
|
23 |
+
.cleditorPrompt textarea {font:8.5pt Arial,Verdana;}
|
24 |
+
.cleditorMsg {background-color:#FDFCEE; width:150px; padding:4px; font-size:8.5pt}
|
DC_MultiViewCal/src/Plugins/jquery.cleditor.js
ADDED
@@ -0,0 +1,1176 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*!
|
2 |
+
CLEditor WYSIWYG HTML Editor v1.4.4
|
3 |
+
http://premiumsoftware.net/CLEditor
|
4 |
+
requires jQuery v1.4.2 or later
|
5 |
+
|
6 |
+
Copyright 2010, Chris Landowski, Premium Software, LLC
|
7 |
+
Dual licensed under the MIT or GPL Version 2 licenses.
|
8 |
+
*/
|
9 |
+
|
10 |
+
(function ($) {
|
11 |
+
|
12 |
+
//==============
|
13 |
+
// jQuery Plugin
|
14 |
+
//==============
|
15 |
+
|
16 |
+
$.cleditor = {
|
17 |
+
|
18 |
+
// Define the defaults used for all new cleditor instances
|
19 |
+
defaultOptions: {
|
20 |
+
width: 'auto', // width not including margins, borders or padding
|
21 |
+
height: 250, // height not including margins, borders or padding
|
22 |
+
controls: // controls to add to the toolbar
|
23 |
+
"bold italic underline strikethrough subscript superscript | font size " +
|
24 |
+
"style | color highlight removeformat | bullets numbering | outdent " +
|
25 |
+
"indent | alignleft center alignright justify | undo redo | " +
|
26 |
+
"rule image link unlink | cut copy paste pastetext | print source",
|
27 |
+
colors: // colors in the color popup
|
28 |
+
"FFF FCC FC9 FF9 FFC 9F9 9FF CFF CCF FCF " +
|
29 |
+
"CCC F66 F96 FF6 FF3 6F9 3FF 6FF 99F F9F " +
|
30 |
+
"BBB F00 F90 FC6 FF0 3F3 6CC 3CF 66C C6C " +
|
31 |
+
"999 C00 F60 FC3 FC0 3C0 0CC 36F 63F C3C " +
|
32 |
+
"666 900 C60 C93 990 090 399 33F 60C 939 " +
|
33 |
+
"333 600 930 963 660 060 366 009 339 636 " +
|
34 |
+
"000 300 630 633 330 030 033 006 309 303",
|
35 |
+
fonts: // font names in the font popup
|
36 |
+
"Arial,Arial Black,Comic Sans MS,Courier New,Narrow,Garamond," +
|
37 |
+
"Georgia,Impact,Sans Serif,Serif,Tahoma,Trebuchet MS,Verdana",
|
38 |
+
sizes: // sizes in the font size popup
|
39 |
+
"1,2,3,4,5,6,7",
|
40 |
+
styles: // styles in the style popup
|
41 |
+
[["Paragraph", "<p>"], ["Header 1", "<h1>"], ["Header 2", "<h2>"],
|
42 |
+
["Header 3", "<h3>"], ["Header 4","<h4>"], ["Header 5","<h5>"],
|
43 |
+
["Header 6","<h6>"]],
|
44 |
+
useCSS: true, // use CSS to style HTML when possible (not supported in ie)
|
45 |
+
docType: // Document type contained within the editor
|
46 |
+
'<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">',
|
47 |
+
docCSSFile: // CSS file used to style the document contained within the editor
|
48 |
+
"",
|
49 |
+
bodyStyle: // style to assign to document body contained within the editor
|
50 |
+
"margin:4px; font:10pt Arial,Verdana; cursor:text"
|
51 |
+
},
|
52 |
+
|
53 |
+
// Define all usable toolbar buttons - the init string property is
|
54 |
+
// expanded during initialization back into the buttons object and
|
55 |
+
// separate object properties are created for each button.
|
56 |
+
// e.g. buttons.size.title = "Font Size"
|
57 |
+
buttons: {
|
58 |
+
// name,title,command,popupName (""=use name)
|
59 |
+
init:
|
60 |
+
"bold,,|" +
|
61 |
+
"italic,,|" +
|
62 |
+
"underline,,|" +
|
63 |
+
"strikethrough,,|" +
|
64 |
+
"subscript,,|" +
|
65 |
+
"superscript,,|" +
|
66 |
+
"font,,fontname,|" +
|
67 |
+
"size,Font Size,fontsize,|" +
|
68 |
+
"style,,formatblock,|" +
|
69 |
+
"color,Font Color,forecolor,|" +
|
70 |
+
"highlight,Text Highlight Color,hilitecolor,color|" +
|
71 |
+
"removeformat,Remove Formatting,|" +
|
72 |
+
"bullets,,insertunorderedlist|" +
|
73 |
+
"numbering,,insertorderedlist|" +
|
74 |
+
"outdent,,|" +
|
75 |
+
"indent,,|" +
|
76 |
+
"alignleft,Align Text Left,justifyleft|" +
|
77 |
+
"center,,justifycenter|" +
|
78 |
+
"alignright,Align Text Right,justifyright|" +
|
79 |
+
"justify,,justifyfull|" +
|
80 |
+
"undo,,|" +
|
81 |
+
"redo,,|" +
|
82 |
+
"rule,Insert Horizontal Rule,inserthorizontalrule|" +
|
83 |
+
"image,Insert Image,insertimage,url|" +
|
84 |
+
"link,Insert Hyperlink,createlink,url|" +
|
85 |
+
"unlink,Remove Hyperlink,|" +
|
86 |
+
"cut,,|" +
|
87 |
+
"copy,,|" +
|
88 |
+
"paste,,|" +
|
89 |
+
"pastetext,Paste as Text,inserthtml,|" +
|
90 |
+
"print,,|" +
|
91 |
+
"source,Show Source"
|
92 |
+
},
|
93 |
+
|
94 |
+
// imagesPath - returns the path to the images folder
|
95 |
+
imagesPath: function() { return imagesPath(); }
|
96 |
+
|
97 |
+
};
|
98 |
+
|
99 |
+
// cleditor - creates a new editor for each of the matched textareas
|
100 |
+
$.fn.cleditor = function(options) {
|
101 |
+
|
102 |
+
// Create a new jQuery object to hold the results
|
103 |
+
var $result = $([]);
|
104 |
+
|
105 |
+
// Loop through all matching textareas and create the editors
|
106 |
+
this.each(function(idx, elem) {
|
107 |
+
if (elem.tagName.toUpperCase() === "TEXTAREA") {
|
108 |
+
var data = $.data(elem, CLEDITOR);
|
109 |
+
if (!data) data = new cleditor(elem, options);
|
110 |
+
$result = $result.add(data);
|
111 |
+
}
|
112 |
+
});
|
113 |
+
|
114 |
+
// return the new jQuery object
|
115 |
+
return $result;
|
116 |
+
|
117 |
+
};
|
118 |
+
|
119 |
+
//==================
|
120 |
+
// Private Variables
|
121 |
+
//==================
|
122 |
+
|
123 |
+
var
|
124 |
+
|
125 |
+
// Misc constants
|
126 |
+
BACKGROUND_COLOR = "backgroundColor",
|
127 |
+
BLURRED = "blurred",
|
128 |
+
BUTTON = "button",
|
129 |
+
BUTTON_NAME = "buttonName",
|
130 |
+
CHANGE = "change",
|
131 |
+
CLEDITOR = "cleditor",
|
132 |
+
CLICK = "click",
|
133 |
+
DISABLED = "disabled",
|
134 |
+
DIV_TAG = "<div>",
|
135 |
+
FOCUSED = "focused",
|
136 |
+
TRANSPARENT = "transparent",
|
137 |
+
UNSELECTABLE = "unselectable",
|
138 |
+
|
139 |
+
// Class name constants
|
140 |
+
MAIN_CLASS = "cleditorMain", // main containing div
|
141 |
+
TOOLBAR_CLASS = "cleditorToolbar", // toolbar div inside main div
|
142 |
+
GROUP_CLASS = "cleditorGroup", // group divs inside the toolbar div
|
143 |
+
BUTTON_CLASS = "cleditorButton", // button divs inside group div
|
144 |
+
DISABLED_CLASS = "cleditorDisabled",// disabled button divs
|
145 |
+
DIVIDER_CLASS = "cleditorDivider", // divider divs inside group div
|
146 |
+
POPUP_CLASS = "cleditorPopup", // popup divs inside body
|
147 |
+
LIST_CLASS = "cleditorList", // list popup divs inside body
|
148 |
+
COLOR_CLASS = "cleditorColor", // color popup div inside body
|
149 |
+
PROMPT_CLASS = "cleditorPrompt", // prompt popup divs inside body
|
150 |
+
MSG_CLASS = "cleditorMsg", // message popup div inside body
|
151 |
+
|
152 |
+
// Browser detection
|
153 |
+
ua = navigator.userAgent.toLowerCase(),
|
154 |
+
ie = /msie/.test(ua),
|
155 |
+
ie6 = /msie\s6/.test(ua),
|
156 |
+
iege11 = /(trident)(?:.*rv:([\w.]+))?/.test(ua),
|
157 |
+
webkit = /webkit/.test(ua),
|
158 |
+
|
159 |
+
// Test for iPhone/iTouch/iPad
|
160 |
+
iOS = /iphone|ipad|ipod/i.test(ua),
|
161 |
+
|
162 |
+
// Popups are created once as needed and shared by all editor instances
|
163 |
+
popups = {},
|
164 |
+
|
165 |
+
// Used to prevent the document click event from being bound more than once
|
166 |
+
documentClickAssigned,
|
167 |
+
|
168 |
+
// Local copy of the buttons object
|
169 |
+
buttons = $.cleditor.buttons;
|
170 |
+
|
171 |
+
//===============
|
172 |
+
// Initialization
|
173 |
+
//===============
|
174 |
+
|
175 |
+
// Expand the buttons.init string back into the buttons object
|
176 |
+
// and create seperate object properties for each button.
|
177 |
+
// e.g. buttons.size.title = "Font Size"
|
178 |
+
$.each(buttons.init.split("|"), function(idx, button) {
|
179 |
+
var items = button.split(","), name = items[0];
|
180 |
+
buttons[name] = {
|
181 |
+
stripIndex: idx,
|
182 |
+
name: name,
|
183 |
+
title: items[1] === "" ? name.charAt(0).toUpperCase() + name.substr(1) : items[1],
|
184 |
+
command: items[2] === "" ? name : items[2],
|
185 |
+
popupName: items[3] === "" ? name : items[3]
|
186 |
+
};
|
187 |
+
});
|
188 |
+
delete buttons.init;
|
189 |
+
|
190 |
+
//============
|
191 |
+
// Constructor
|
192 |
+
//============
|
193 |
+
|
194 |
+
// cleditor - creates a new editor for the passed in textarea element
|
195 |
+
cleditor = function(area, options) {
|
196 |
+
|
197 |
+
var editor = this;
|
198 |
+
|
199 |
+
// Get the defaults and override with options
|
200 |
+
editor.options = options = $.extend({}, $.cleditor.defaultOptions, options);
|
201 |
+
|
202 |
+
// Hide the textarea and associate it with this editor
|
203 |
+
var $area = editor.$area = $(area)
|
204 |
+
.hide()
|
205 |
+
.data(CLEDITOR, editor)
|
206 |
+
.blur(function() {
|
207 |
+
// Update the iframe when the textarea loses focus
|
208 |
+
updateFrame(editor, true);
|
209 |
+
});
|
210 |
+
|
211 |
+
// Create the main container and append the textarea
|
212 |
+
var $main = editor.$main = $(DIV_TAG)
|
213 |
+
.addClass(MAIN_CLASS)
|
214 |
+
.width(options.width)
|
215 |
+
.height(options.height);
|
216 |
+
|
217 |
+
// Create the toolbar
|
218 |
+
var $toolbar = editor.$toolbar = $(DIV_TAG)
|
219 |
+
.addClass(TOOLBAR_CLASS)
|
220 |
+
.appendTo($main);
|
221 |
+
|
222 |
+
// Add the first group to the toolbar
|
223 |
+
var $group = $(DIV_TAG)
|
224 |
+
.addClass(GROUP_CLASS)
|
225 |
+
.appendTo($toolbar);
|
226 |
+
|
227 |
+
// Initialize the group width
|
228 |
+
var groupWidth = 0;
|
229 |
+
|
230 |
+
// Add the buttons to the toolbar
|
231 |
+
$.each(options.controls.split(" "), function(idx, buttonName) {
|
232 |
+
if (buttonName === "") return true;
|
233 |
+
|
234 |
+
// Divider
|
235 |
+
if (buttonName === "|") {
|
236 |
+
|
237 |
+
// Add a new divider to the group
|
238 |
+
var $div = $(DIV_TAG)
|
239 |
+
.addClass(DIVIDER_CLASS)
|
240 |
+
.appendTo($group);
|
241 |
+
|
242 |
+
// Update the group width
|
243 |
+
$group.width(groupWidth + 1);
|
244 |
+
groupWidth = 0;
|
245 |
+
|
246 |
+
// Create a new group
|
247 |
+
$group = $(DIV_TAG)
|
248 |
+
.addClass(GROUP_CLASS)
|
249 |
+
.appendTo($toolbar);
|
250 |
+
|
251 |
+
}
|
252 |
+
|
253 |
+
// Button
|
254 |
+
else {
|
255 |
+
|
256 |
+
// Get the button definition
|
257 |
+
var button = buttons[buttonName];
|
258 |
+
|
259 |
+
// Add a new button to the group
|
260 |
+
var $buttonDiv = $(DIV_TAG)
|
261 |
+
.data(BUTTON_NAME, button.name)
|
262 |
+
.addClass(BUTTON_CLASS)
|
263 |
+
.attr("title", button.title)
|
264 |
+
.bind(CLICK, $.proxy(buttonClick, editor))
|
265 |
+
.appendTo($group)
|
266 |
+
.hover(hoverEnter, hoverLeave);
|
267 |
+
|
268 |
+
// Update the group width
|
269 |
+
groupWidth += 24;
|
270 |
+
$group.width(groupWidth + 1);
|
271 |
+
|
272 |
+
// Prepare the button image
|
273 |
+
var map = {};
|
274 |
+
if (button.css) map = button.css;
|
275 |
+
else if (button.image) map.backgroundImage = imageUrl(button.image);
|
276 |
+
if (button.stripIndex) map.backgroundPosition = button.stripIndex * -24;
|
277 |
+
$buttonDiv.css(map);
|
278 |
+
|
279 |
+
// Add the unselectable attribute for ie
|
280 |
+
if (ie)
|
281 |
+
$buttonDiv.attr(UNSELECTABLE, "on");
|
282 |
+
|
283 |
+
// Create the popup
|
284 |
+
if (button.popupName)
|
285 |
+
createPopup(button.popupName, options, button.popupClass,
|
286 |
+
button.popupContent, button.popupHover);
|
287 |
+
|
288 |
+
}
|
289 |
+
|
290 |
+
});
|
291 |
+
|
292 |
+
// Add the main div to the DOM and append the textarea
|
293 |
+
$main.insertBefore($area)
|
294 |
+
.append($area);
|
295 |
+
|
296 |
+
// Bind the document click event handler
|
297 |
+
if (!documentClickAssigned) {
|
298 |
+
$(document).click(function(e) {
|
299 |
+
// Dismiss all non-prompt popups
|
300 |
+
var $target = $(e.target);
|
301 |
+
if (!$target.add($target.parents()).is("." + PROMPT_CLASS))
|
302 |
+
hidePopups();
|
303 |
+
});
|
304 |
+
documentClickAssigned = true;
|
305 |
+
}
|
306 |
+
|
307 |
+
// Bind the window resize event when the width or height is auto or %
|
308 |
+
if (/auto|%/.test("" + options.width + options.height))
|
309 |
+
$(window).bind('resize.cleditor', function () { refresh(editor); });
|
310 |
+
|
311 |
+
// Create the iframe and resize the controls
|
312 |
+
refresh(editor);
|
313 |
+
|
314 |
+
};
|
315 |
+
|
316 |
+
//===============
|
317 |
+
// Public Methods
|
318 |
+
//===============
|
319 |
+
|
320 |
+
var fn = cleditor.prototype,
|
321 |
+
|
322 |
+
// Expose the following private functions as methods on the cleditor object.
|
323 |
+
// The closure compiler will rename the private functions. However, the
|
324 |
+
// exposed method names on the cleditor object will remain fixed.
|
325 |
+
methods = [
|
326 |
+
["clear", clear],
|
327 |
+
["disable", disable],
|
328 |
+
["execCommand", execCommand],
|
329 |
+
["focus", focus],
|
330 |
+
["hidePopups", hidePopups],
|
331 |
+
["sourceMode", sourceMode, true],
|
332 |
+
["refresh", refresh],
|
333 |
+
["select", select],
|
334 |
+
["selectedHTML", selectedHTML, true],
|
335 |
+
["selectedText", selectedText, true],
|
336 |
+
["showMessage", showMessage],
|
337 |
+
["updateFrame", updateFrame],
|
338 |
+
["updateTextArea", updateTextArea]
|
339 |
+
];
|
340 |
+
|
341 |
+
$.each(methods, function(idx, method) {
|
342 |
+
fn[method[0]] = function() {
|
343 |
+
var editor = this, args = [editor];
|
344 |
+
// using each here would cast booleans into objects!
|
345 |
+
for(var x = 0; x < arguments.length; x++) {args.push(arguments[x]);}
|
346 |
+
var result = method[1].apply(editor, args);
|
347 |
+
if (method[2]) return result;
|
348 |
+
return editor;
|
349 |
+
};
|
350 |
+
});
|
351 |
+
|
352 |
+
// blurred - shortcut for .bind("blurred", handler) or .trigger("blurred")
|
353 |
+
fn.blurred = function(handler) {
|
354 |
+
var $this = $(this);
|
355 |
+
return handler ? $this.bind(BLURRED, handler) : $this.trigger(BLURRED);
|
356 |
+
};
|
357 |
+
|
358 |
+
// change - shortcut for .bind("change", handler) or .trigger("change")
|
359 |
+
fn.change = function change(handler) {
|
360 |
+
console.log('change test');
|
361 |
+
var $this = $(this);
|
362 |
+
return handler ? $this.bind(CHANGE, handler) : $this.trigger(CHANGE);
|
363 |
+
};
|
364 |
+
|
365 |
+
// focused - shortcut for .bind("focused", handler) or .trigger("focused")
|
366 |
+
fn.focused = function(handler) {
|
367 |
+
var $this = $(this);
|
368 |
+
return handler ? $this.bind(FOCUSED, handler) : $this.trigger(FOCUSED);
|
369 |
+
};
|
370 |
+
|
371 |
+
//===============
|
372 |
+
// Event Handlers
|
373 |
+
//===============
|
374 |
+
|
375 |
+
// buttonClick - click event handler for toolbar buttons
|
376 |
+
function buttonClick(e) {
|
377 |
+
|
378 |
+
var editor = this,
|
379 |
+
buttonDiv = e.target,
|
380 |
+
buttonName = $.data(buttonDiv, BUTTON_NAME),
|
381 |
+
button = buttons[buttonName],
|
382 |
+
popupName = button.popupName,
|
383 |
+
popup = popups[popupName];
|
384 |
+
|
385 |
+
// Check if disabled
|
386 |
+
if (editor.disabled || $(buttonDiv).attr(DISABLED) === DISABLED)
|
387 |
+
return;
|
388 |
+
|
389 |
+
// Fire the buttonClick event
|
390 |
+
var data = {
|
391 |
+
editor: editor,
|
392 |
+
button: buttonDiv,
|
393 |
+
buttonName: buttonName,
|
394 |
+
popup: popup,
|
395 |
+
popupName: popupName,
|
396 |
+
command: button.command,
|
397 |
+
useCSS: editor.options.useCSS
|
398 |
+
};
|
399 |
+
|
400 |
+
if (button.buttonClick && button.buttonClick(e, data) === false)
|
401 |
+
return false;
|
402 |
+
|
403 |
+
// Toggle source
|
404 |
+
if (buttonName === "source") {
|
405 |
+
|
406 |
+
// Show the iframe
|
407 |
+
if (sourceMode(editor)) {
|
408 |
+
delete editor.range;
|
409 |
+
editor.$area.hide();
|
410 |
+
editor.$frame.show();
|
411 |
+
buttonDiv.title = button.title;
|
412 |
+
}
|
413 |
+
|
414 |
+
// Show the textarea
|
415 |
+
else {
|
416 |
+
editor.$frame.hide();
|
417 |
+
editor.$area.show();
|
418 |
+
buttonDiv.title = "Show Rich Text";
|
419 |
+
}
|
420 |
+
|
421 |
+
// Enable or disable the toolbar buttons
|
422 |
+
// IE requires the timeout
|
423 |
+
setTimeout(function() {refreshButtons(editor);}, 100);
|
424 |
+
|
425 |
+
}
|
426 |
+
|
427 |
+
// Check for rich text mode
|
428 |
+
else if (!sourceMode(editor)) {
|
429 |
+
|
430 |
+
// Handle popups
|
431 |
+
if (popupName) {
|
432 |
+
var $popup = $(popup);
|
433 |
+
|
434 |
+
// URL
|
435 |
+
if (popupName === "url") {
|
436 |
+
|
437 |
+
// Check for selection before showing the link url popup
|
438 |
+
if (buttonName === "link" && selectedText(editor) === "") {
|
439 |
+
showMessage(editor, "A selection is required when inserting a link.", buttonDiv);
|
440 |
+
return false;
|
441 |
+
}
|
442 |
+
|
443 |
+
// Wire up the submit button click event handler
|
444 |
+
$popup.children(":button")
|
445 |
+
.unbind(CLICK)
|
446 |
+
.bind(CLICK, function() {
|
447 |
+
|
448 |
+
// Insert the image or link if a url was entered
|
449 |
+
var $text = $popup.find(":text"),
|
450 |
+
url = $.trim($text.val());
|
451 |
+
if (url !== "")
|
452 |
+
execCommand(editor, data.command, url, null, data.button);
|
453 |
+
|
454 |
+
// Reset the text, hide the popup and set focus
|
455 |
+
$text.val("http://");
|
456 |
+
hidePopups();
|
457 |
+
focus(editor);
|
458 |
+
|
459 |
+
});
|
460 |
+
|
461 |
+
}
|
462 |
+
|
463 |
+
// Paste as Text
|
464 |
+
else if (popupName === "pastetext") {
|
465 |
+
|
466 |
+
// Wire up the submit button click event handler
|
467 |
+
$popup.children(":button")
|
468 |
+
.unbind(CLICK)
|
469 |
+
.bind(CLICK, function() {
|
470 |
+
|
471 |
+
// Insert the unformatted text replacing new lines with break tags
|
472 |
+
var $textarea = $popup.find("textarea"),
|
473 |
+
text = $textarea.val().replace(/\n/g, "<br />");
|
474 |
+
if (text !== "")
|
475 |
+
execCommand(editor, data.command, text, null, data.button);
|
476 |
+
|
477 |
+
// Reset the text, hide the popup and set focus
|
478 |
+
$textarea.val("");
|
479 |
+
hidePopups();
|
480 |
+
focus(editor);
|
481 |
+
|
482 |
+
});
|
483 |
+
|
484 |
+
}
|
485 |
+
|
486 |
+
// Show the popup if not already showing for this button
|
487 |
+
if (buttonDiv !== $.data(popup, BUTTON)) {
|
488 |
+
showPopup(editor, popup, buttonDiv);
|
489 |
+
return false; // stop propagination to document click
|
490 |
+
}
|
491 |
+
|
492 |
+
// propaginate to document click
|
493 |
+
return;
|
494 |
+
|
495 |
+
}
|
496 |
+
|
497 |
+
// Print
|
498 |
+
else if (buttonName === "print")
|
499 |
+
editor.$frame[0].contentWindow.print();
|
500 |
+
|
501 |
+
// All other buttons
|
502 |
+
else if (!execCommand(editor, data.command, data.value, data.useCSS, buttonDiv))
|
503 |
+
return false;
|
504 |
+
|
505 |
+
}
|
506 |
+
|
507 |
+
// Focus the editor
|
508 |
+
focus(editor);
|
509 |
+
|
510 |
+
}
|
511 |
+
|
512 |
+
// hoverEnter - mouseenter event handler for buttons and popup items
|
513 |
+
function hoverEnter(e) {
|
514 |
+
var $div = $(e.target).closest("div");
|
515 |
+
$div.css(BACKGROUND_COLOR, $div.data(BUTTON_NAME) ? "#FFF" : "#FFC");
|
516 |
+
}
|
517 |
+
|
518 |
+
// hoverLeave - mouseleave event handler for buttons and popup items
|
519 |
+
function hoverLeave(e) {
|
520 |
+
$(e.target).closest("div").css(BACKGROUND_COLOR, "transparent");
|
521 |
+
}
|
522 |
+
|
523 |
+
// popupClick - click event handler for popup items
|
524 |
+
function popupClick(e) {
|
525 |
+
|
526 |
+
var editor = this,
|
527 |
+
popup = e.data.popup,
|
528 |
+
target = e.target;
|
529 |
+
|
530 |
+
// Check for message and prompt popups
|
531 |
+
if (popup === popups.msg || $(popup).hasClass(PROMPT_CLASS))
|
532 |
+
return;
|
533 |
+
|
534 |
+
// Get the button info
|
535 |
+
var buttonDiv = $.data(popup, BUTTON),
|
536 |
+
buttonName = $.data(buttonDiv, BUTTON_NAME),
|
537 |
+
button = buttons[buttonName],
|
538 |
+
command = button.command,
|
539 |
+
value,
|
540 |
+
useCSS = editor.options.useCSS;
|
541 |
+
|
542 |
+
// Get the command value
|
543 |
+
if (buttonName === "font")
|
544 |
+
// Opera returns the fontfamily wrapped in quotes
|
545 |
+
value = target.style.fontFamily.replace(/"/g, "");
|
546 |
+
else if (buttonName === "size") {
|
547 |
+
if (target.tagName.toUpperCase() === "DIV")
|
548 |
+
target = target.children[0];
|
549 |
+
value = target.innerHTML;
|
550 |
+
}
|
551 |
+
else if (buttonName === "style")
|
552 |
+
value = "<" + target.tagName + ">";
|
553 |
+
else if (buttonName === "color")
|
554 |
+
value = hex(target.style.backgroundColor);
|
555 |
+
else if (buttonName === "highlight") {
|
556 |
+
value = hex(target.style.backgroundColor);
|
557 |
+
if (ie) command = 'backcolor';
|
558 |
+
else useCSS = true;
|
559 |
+
}
|
560 |
+
|
561 |
+
// Fire the popupClick event
|
562 |
+
var data = {
|
563 |
+
editor: editor,
|
564 |
+
button: buttonDiv,
|
565 |
+
buttonName: buttonName,
|
566 |
+
popup: popup,
|
567 |
+
popupName: button.popupName,
|
568 |
+
command: command,
|
569 |
+
value: value,
|
570 |
+
useCSS: useCSS
|
571 |
+
};
|
572 |
+
|
573 |
+
if (button.popupClick && button.popupClick(e, data) === false)
|
574 |
+
return;
|
575 |
+
|
576 |
+
// Execute the command
|
577 |
+
if (data.command && !execCommand(editor, data.command, data.value, data.useCSS, buttonDiv))
|
578 |
+
return false;
|
579 |
+
|
580 |
+
// Hide the popup and focus the editor
|
581 |
+
hidePopups();
|
582 |
+
focus(editor);
|
583 |
+
|
584 |
+
}
|
585 |
+
|
586 |
+
//==================
|
587 |
+
// Private Functions
|
588 |
+
//==================
|
589 |
+
|
590 |
+
// checksum - returns a checksum using the Adler-32 method
|
591 |
+
function checksum(text)
|
592 |
+
{
|
593 |
+
var a = 1, b = 0;
|
594 |
+
for (var index = 0; index < text.length; ++index) {
|
595 |
+
a = (a + text.charCodeAt(index)) % 65521;
|
596 |
+
b = (b + a) % 65521;
|
597 |
+
}
|
598 |
+
return (b << 16) | a;
|
599 |
+
}
|
600 |
+
|
601 |
+
// clear - clears the contents of the editor
|
602 |
+
function clear(editor) {
|
603 |
+
editor.$area.val("");
|
604 |
+
updateFrame(editor);
|
605 |
+
}
|
606 |
+
|
607 |
+
// createPopup - creates a popup and adds it to the body
|
608 |
+
function createPopup(popupName, options, popupTypeClass, popupContent, popupHover) {
|
609 |
+
|
610 |
+
// Check if popup already exists
|
611 |
+
if (popups[popupName])
|
612 |
+
return popups[popupName];
|
613 |
+
|
614 |
+
// Create the popup
|
615 |
+
var $popup = $(DIV_TAG)
|
616 |
+
.hide()
|
617 |
+
.addClass(POPUP_CLASS)
|
618 |
+
.appendTo("body");
|
619 |
+
|
620 |
+
// Add the content
|
621 |
+
|
622 |
+
// Custom popup
|
623 |
+
if (popupContent)
|
624 |
+
$popup.html(popupContent);
|
625 |
+
|
626 |
+
// Color
|
627 |
+
else if (popupName === "color") {
|
628 |
+
var colors = options.colors.split(" ");
|
629 |
+
if (colors.length < 10)
|
630 |
+
$popup.width("auto");
|
631 |
+
$.each(colors, function(idx, color) {
|
632 |
+
$(DIV_TAG).appendTo($popup)
|
633 |
+
.css(BACKGROUND_COLOR, "#" + color);
|
634 |
+
});
|
635 |
+
popupTypeClass = COLOR_CLASS;
|
636 |
+
}
|
637 |
+
|
638 |
+
// Font
|
639 |
+
else if (popupName === "font")
|
640 |
+
$.each(options.fonts.split(","), function(idx, font) {
|
641 |
+
$(DIV_TAG).appendTo($popup)
|
642 |
+
.css("fontFamily", font)
|
643 |
+
.html(font);
|
644 |
+
});
|
645 |
+
|
646 |
+
// Size
|
647 |
+
else if (popupName === "size")
|
648 |
+
$.each(options.sizes.split(","), function(idx, size) {
|
649 |
+
$(DIV_TAG).appendTo($popup)
|
650 |
+
.html('<font size="' + size + '">' + size + '</font>');
|
651 |
+
});
|
652 |
+
|
653 |
+
// Style
|
654 |
+
else if (popupName === "style")
|
655 |
+
$.each(options.styles, function(idx, style) {
|
656 |
+
$(DIV_TAG).appendTo($popup)
|
657 |
+
.html(style[1] + style[0] + style[1].replace("<", "</"));
|
658 |
+
});
|
659 |
+
|
660 |
+
// URL
|
661 |
+
else if (popupName === "url") {
|
662 |
+
$popup.html('Enter URL:<br /><input type="text" value="http://" size="35" /><br /><input type="button" value="Submit" />');
|
663 |
+
popupTypeClass = PROMPT_CLASS;
|
664 |
+
}
|
665 |
+
|
666 |
+
// Paste as Text
|
667 |
+
else if (popupName === "pastetext") {
|
668 |
+
$popup.html('Paste your content here and click submit.<br /><textarea cols="40" rows="3"></textarea><br /><input type="button" value="Submit" />');
|
669 |
+
popupTypeClass = PROMPT_CLASS;
|
670 |
+
}
|
671 |
+
|
672 |
+
// Add the popup type class name
|
673 |
+
if (!popupTypeClass && !popupContent)
|
674 |
+
popupTypeClass = LIST_CLASS;
|
675 |
+
$popup.addClass(popupTypeClass);
|
676 |
+
|
677 |
+
// Add the unselectable attribute to all items
|
678 |
+
if (ie) {
|
679 |
+
$popup.attr(UNSELECTABLE, "on")
|
680 |
+
.find("div,font,p,h1,h2,h3,h4,h5,h6")
|
681 |
+
.attr(UNSELECTABLE, "on");
|
682 |
+
}
|
683 |
+
|
684 |
+
// Add the hover effect to all items
|
685 |
+
if ($popup.hasClass(LIST_CLASS) || popupHover === true)
|
686 |
+
$popup.children().hover(hoverEnter, hoverLeave);
|
687 |
+
|
688 |
+
// Add the popup to the array and return it
|
689 |
+
popups[popupName] = $popup[0];
|
690 |
+
return $popup[0];
|
691 |
+
|
692 |
+
}
|
693 |
+
|
694 |
+
// disable - enables or disables the editor
|
695 |
+
function disable(editor, disabled) {
|
696 |
+
|
697 |
+
// Update the textarea and save the state
|
698 |
+
if (disabled) {
|
699 |
+
editor.$area.attr(DISABLED, DISABLED);
|
700 |
+
editor.disabled = true;
|
701 |
+
}
|
702 |
+
else {
|
703 |
+
editor.$area.removeAttr(DISABLED);
|
704 |
+
delete editor.disabled;
|
705 |
+
}
|
706 |
+
|
707 |
+
// Switch the iframe into design mode.
|
708 |
+
// ie6 does not support designMode.
|
709 |
+
// ie7 & ie8 do not properly support designMode="off".
|
710 |
+
try {
|
711 |
+
if (ie) editor.doc.body.contentEditable = !disabled;
|
712 |
+
else editor.doc.designMode = !disabled ? "on" : "off";
|
713 |
+
}
|
714 |
+
// Firefox 1.5 throws an exception that can be ignored
|
715 |
+
// when toggling designMode from off to on.
|
716 |
+
catch (err) {}
|
717 |
+
|
718 |
+
// Enable or disable the toolbar buttons
|
719 |
+
refreshButtons(editor);
|
720 |
+
|
721 |
+
}
|
722 |
+
|
723 |
+
// execCommand - executes a designMode command
|
724 |
+
function execCommand(editor, command, value, useCSS, button) {
|
725 |
+
|
726 |
+
// Restore the current ie selection
|
727 |
+
restoreRange(editor);
|
728 |
+
|
729 |
+
// Set the styling method
|
730 |
+
if (!ie) {
|
731 |
+
if (useCSS === undefined || useCSS === null)
|
732 |
+
useCSS = editor.options.useCSS;
|
733 |
+
editor.doc.execCommand("styleWithCSS", 0, useCSS.toString());
|
734 |
+
}
|
735 |
+
|
736 |
+
// Execute the command and check for error
|
737 |
+
var success = true, message;
|
738 |
+
if (ie && command.toLowerCase() === "inserthtml")
|
739 |
+
getRange(editor).pasteHTML(value);
|
740 |
+
else {
|
741 |
+
try { success = editor.doc.execCommand(command, 0, value || null); }
|
742 |
+
catch (err) { message = err.message; success = false; }
|
743 |
+
if (!success) {
|
744 |
+
if ("cutcopypaste".indexOf(command) > -1)
|
745 |
+
showMessage(editor, "For security reasons, your browser does not support the " +
|
746 |
+
command + " command. Try using the keyboard shortcut or context menu instead.",
|
747 |
+
button);
|
748 |
+
else
|
749 |
+
showMessage(editor,
|
750 |
+
(message ? message : "Error executing the " + command + " command."),
|
751 |
+
button);
|
752 |
+
}
|
753 |
+
}
|
754 |
+
|
755 |
+
// Enable the buttons and update the textarea
|
756 |
+
refreshButtons(editor);
|
757 |
+
updateTextArea(editor, true);
|
758 |
+
return success;
|
759 |
+
|
760 |
+
}
|
761 |
+
|
762 |
+
// focus - sets focus to either the textarea or iframe
|
763 |
+
function focus(editor) {
|
764 |
+
setTimeout(function() {
|
765 |
+
if (sourceMode(editor)) editor.$area.focus();
|
766 |
+
else editor.$frame[0].contentWindow.focus();
|
767 |
+
refreshButtons(editor);
|
768 |
+
}, 0);
|
769 |
+
}
|
770 |
+
|
771 |
+
// getRange - gets the current text range object
|
772 |
+
function getRange(editor) {
|
773 |
+
if (ie) return getSelection(editor).createRange();
|
774 |
+
return getSelection(editor).getRangeAt(0);
|
775 |
+
}
|
776 |
+
|
777 |
+
// getSelection - gets the current text range object
|
778 |
+
function getSelection(editor) {
|
779 |
+
if (ie) return editor.doc.selection;
|
780 |
+
return editor.$frame[0].contentWindow.getSelection();
|
781 |
+
}
|
782 |
+
|
783 |
+
// hex - returns the hex value for the passed in color string
|
784 |
+
function hex(s) {
|
785 |
+
|
786 |
+
// hex("rgb(255, 0, 0)") returns #FF0000
|
787 |
+
var m = /rgba?\((\d+), (\d+), (\d+)/.exec(s);
|
788 |
+
if (m) {
|
789 |
+
s = (m[1] << 16 | m[2] << 8 | m[3]).toString(16);
|
790 |
+
while (s.length < 6)
|
791 |
+
s = "0" + s;
|
792 |
+
return "#" + s;
|
793 |
+
}
|
794 |
+
|
795 |
+
// hex("#F00") returns #FF0000
|
796 |
+
var c = s.split("");
|
797 |
+
if (s.length === 4)
|
798 |
+
return "#" + c[1] + c[1] + c[2] + c[2] + c[3] + c[3];
|
799 |
+
|
800 |
+
// hex("#FF0000") returns #FF0000
|
801 |
+
return s;
|
802 |
+
|
803 |
+
}
|
804 |
+
|
805 |
+
// hidePopups - hides all popups
|
806 |
+
function hidePopups() {
|
807 |
+
$.each(popups, function(idx, popup) {
|
808 |
+
$(popup)
|
809 |
+
.hide()
|
810 |
+
.unbind(CLICK)
|
811 |
+
.removeData(BUTTON);
|
812 |
+
});
|
813 |
+
}
|
814 |
+
|
815 |
+
// imagesPath - returns the path to the images folder
|
816 |
+
function imagesPath() {
|
817 |
+
var href = $("link[href*=cleditor]").attr("href");
|
818 |
+
return href.replace(/^(.*\/)[^\/]+$/, '$1') + "images/";
|
819 |
+
}
|
820 |
+
|
821 |
+
// imageUrl - Returns the css url string for a filemane
|
822 |
+
function imageUrl(filename) {
|
823 |
+
return "url(" + imagesPath() + filename + ")";
|
824 |
+
}
|
825 |
+
|
826 |
+
// refresh - creates the iframe and resizes the controls
|
827 |
+
function refresh(editor) {
|
828 |
+
|
829 |
+
var $main = editor.$main,
|
830 |
+
options = editor.options;
|
831 |
+
|
832 |
+
// Remove the old iframe
|
833 |
+
if (editor.$frame)
|
834 |
+
editor.$frame.remove();
|
835 |
+
|
836 |
+
// Create a new iframe
|
837 |
+
var $frame = editor.$frame = $('<iframe frameborder="0" src="javascript:true;" />')
|
838 |
+
.hide()
|
839 |
+
.appendTo($main);
|
840 |
+
|
841 |
+
// Load the iframe document content
|
842 |
+
var contentWindow = $frame[0].contentWindow,
|
843 |
+
doc = editor.doc = contentWindow.document,
|
844 |
+
$doc = $(doc);
|
845 |
+
|
846 |
+
doc.open();
|
847 |
+
doc.write(
|
848 |
+
options.docType +
|
849 |
+
'<html style="height:100%">' +
|
850 |
+
((options.docCSSFile === '') ? '' : '<head><link rel="stylesheet" type="text/css" href="' + options.docCSSFile + '" /></head>') +
|
851 |
+
'<body style="height:100%;' + options.bodyStyle + '"></body></html>'
|
852 |
+
);
|
853 |
+
doc.close();
|
854 |
+
|
855 |
+
// Work around for bug in IE which causes the editor to lose
|
856 |
+
// focus when clicking below the end of the document.
|
857 |
+
if (ie || iege11)
|
858 |
+
$doc.click(function() {focus(editor);});
|
859 |
+
|
860 |
+
// Load the content
|
861 |
+
updateFrame(editor);
|
862 |
+
|
863 |
+
// Bind the ie specific iframe event handlers
|
864 |
+
if (ie || iege11) {
|
865 |
+
|
866 |
+
// Save the current user selection. This code is needed since IE will
|
867 |
+
// reset the selection just after the beforedeactivate event and just
|
868 |
+
// before the beforeactivate event.
|
869 |
+
$doc.bind("beforedeactivate beforeactivate selectionchange keypress", function(e) {
|
870 |
+
|
871 |
+
// Flag the editor as inactive
|
872 |
+
if (e.type === "beforedeactivate")
|
873 |
+
editor.inactive = true;
|
874 |
+
|
875 |
+
// Get rid of the bogus selection and flag the editor as active
|
876 |
+
else if (e.type === "beforeactivate") {
|
877 |
+
if (!editor.inactive && editor.range && editor.range.length > 1)
|
878 |
+
editor.range.shift();
|
879 |
+
delete editor.inactive;
|
880 |
+
}
|
881 |
+
|
882 |
+
// Save the selection when the editor is active
|
883 |
+
else if (!editor.inactive) {
|
884 |
+
if (!editor.range)
|
885 |
+
editor.range = [];
|
886 |
+
editor.range.unshift(getRange(editor));
|
887 |
+
|
888 |
+
// We only need the last 2 selections
|
889 |
+
while (editor.range.length > 2)
|
890 |
+
editor.range.pop();
|
891 |
+
}
|
892 |
+
|
893 |
+
});
|
894 |
+
|
895 |
+
// Restore the text range and trigger focused event when the iframe gains focus
|
896 |
+
$frame.focus(function() {
|
897 |
+
restoreRange(editor);
|
898 |
+
$(editor).triggerHandler(FOCUSED);
|
899 |
+
});
|
900 |
+
|
901 |
+
// Trigger blurred event when the iframe looses focus
|
902 |
+
$frame.blur(function() {
|
903 |
+
$(editor).triggerHandler(BLURRED);
|
904 |
+
});
|
905 |
+
|
906 |
+
}
|
907 |
+
|
908 |
+
// Trigger focused and blurred events for all other browsers
|
909 |
+
else {
|
910 |
+
$(editor.$frame[0].contentWindow)
|
911 |
+
.focus(function () { $(editor).triggerHandler(FOCUSED); })
|
912 |
+
.blur(function () { $(editor).triggerHandler(BLURRED); });
|
913 |
+
}
|
914 |
+
|
915 |
+
// Enable the toolbar buttons and update the textarea as the user types or clicks
|
916 |
+
$doc.click(hidePopups)
|
917 |
+
.bind("keyup mouseup", function() {
|
918 |
+
refreshButtons(editor);
|
919 |
+
updateTextArea(editor, true);
|
920 |
+
});
|
921 |
+
|
922 |
+
// Show the textarea for iPhone/iTouch/iPad or
|
923 |
+
// the iframe when design mode is supported.
|
924 |
+
if (iOS) editor.$area.show();
|
925 |
+
else $frame.show();
|
926 |
+
|
927 |
+
// Wait for the layout to finish - shortcut for $(document).ready()
|
928 |
+
$(function() {
|
929 |
+
|
930 |
+
var $toolbar = editor.$toolbar,
|
931 |
+
$group = $toolbar.children("div:last"),
|
932 |
+
wid = $main.width();
|
933 |
+
|
934 |
+
// Resize the toolbar
|
935 |
+
var hgt = $group.offset().top + $group.outerHeight() - $toolbar.offset().top + 1;
|
936 |
+
$toolbar.height(hgt);
|
937 |
+
|
938 |
+
// Resize the iframe
|
939 |
+
hgt = (/%/.test("" + options.height) ? $main.height() : parseInt(options.height, 10)) - hgt;
|
940 |
+
$frame.width(wid).height(hgt);
|
941 |
+
|
942 |
+
// Resize the textarea. IE6 textareas have a 1px top
|
943 |
+
// & bottom margin that cannot be removed using css.
|
944 |
+
editor.$area.width(wid).height(ie6 ? hgt - 2 : hgt);
|
945 |
+
|
946 |
+
// Switch the iframe into design mode if enabled
|
947 |
+
disable(editor, editor.disabled);
|
948 |
+
|
949 |
+
// Enable or disable the toolbar buttons
|
950 |
+
refreshButtons(editor);
|
951 |
+
|
952 |
+
});
|
953 |
+
|
954 |
+
}
|
955 |
+
|
956 |
+
// refreshButtons - enables or disables buttons based on availability
|
957 |
+
function refreshButtons(editor) {
|
958 |
+
|
959 |
+
// Webkit requires focus before queryCommandEnabled will return anything but false
|
960 |
+
if (!iOS && webkit && !editor.focused) {
|
961 |
+
editor.$frame[0].contentWindow.focus();
|
962 |
+
window.focus();
|
963 |
+
editor.focused = true;
|
964 |
+
}
|
965 |
+
|
966 |
+
// Get the object used for checking queryCommandEnabled
|
967 |
+
var queryObj = editor.doc;
|
968 |
+
if (ie) queryObj = getRange(editor);
|
969 |
+
|
970 |
+
// Loop through each button
|
971 |
+
var inSourceMode = sourceMode(editor);
|
972 |
+
$.each(editor.$toolbar.find("." + BUTTON_CLASS), function(idx, elem) {
|
973 |
+
|
974 |
+
var $elem = $(elem),
|
975 |
+
button = $.cleditor.buttons[$.data(elem, BUTTON_NAME)],
|
976 |
+
command = button.command,
|
977 |
+
enabled = true;
|
978 |
+
|
979 |
+
// Determine the state
|
980 |
+
if (editor.disabled)
|
981 |
+
enabled = false;
|
982 |
+
else if (button.getEnabled) {
|
983 |
+
var data = {
|
984 |
+
editor: editor,
|
985 |
+
button: elem,
|
986 |
+
buttonName: button.name,
|
987 |
+
popup: popups[button.popupName],
|
988 |
+
popupName: button.popupName,
|
989 |
+
command: button.command,
|
990 |
+
useCSS: editor.options.useCSS
|
991 |
+
};
|
992 |
+
enabled = button.getEnabled(data);
|
993 |
+
if (enabled === undefined)
|
994 |
+
enabled = true;
|
995 |
+
}
|
996 |
+
else if (((inSourceMode || iOS) && button.name !== "source") ||
|
997 |
+
(ie && (command === "undo" || command === "redo")))
|
998 |
+
enabled = false;
|
999 |
+
else if (command && command !== "print") {
|
1000 |
+
if (ie && command === "hilitecolor")
|
1001 |
+
command = "backcolor";
|
1002 |
+
// IE does not support inserthtml, so it's always enabled
|
1003 |
+
if (!ie || command !== "inserthtml") {
|
1004 |
+
try {enabled = queryObj.queryCommandEnabled(command);}
|
1005 |
+
catch (err) {enabled = false;}
|
1006 |
+
}
|
1007 |
+
}
|
1008 |
+
|
1009 |
+
// Enable or disable the button
|
1010 |
+
if (enabled) {
|
1011 |
+
$elem.removeClass(DISABLED_CLASS);
|
1012 |
+
$elem.removeAttr(DISABLED);
|
1013 |
+
}
|
1014 |
+
else {
|
1015 |
+
$elem.addClass(DISABLED_CLASS);
|
1016 |
+
$elem.attr(DISABLED, DISABLED);
|
1017 |
+
}
|
1018 |
+
|
1019 |
+
});
|
1020 |
+
}
|
1021 |
+
|
1022 |
+
// restoreRange - restores the current ie selection
|
1023 |
+
function restoreRange(editor) {
|
1024 |
+
if (editor.range) {
|
1025 |
+
if (ie)
|
1026 |
+
editor.range[0].select();
|
1027 |
+
else if (iege11)
|
1028 |
+
getSelection(editor).addRange(editor.range[0]);
|
1029 |
+
}
|
1030 |
+
}
|
1031 |
+
|
1032 |
+
// select - selects all the text in either the textarea or iframe
|
1033 |
+
function select(editor) {
|
1034 |
+
setTimeout(function() {
|
1035 |
+
if (sourceMode(editor)) editor.$area.select();
|
1036 |
+
else execCommand(editor, "selectall");
|
1037 |
+
}, 0);
|
1038 |
+
}
|
1039 |
+
|
1040 |
+
// selectedHTML - returns the current HTML selection or and empty string
|
1041 |
+
function selectedHTML(editor) {
|
1042 |
+
restoreRange(editor);
|
1043 |
+
var range = getRange(editor);
|
1044 |
+
if (ie)
|
1045 |
+
return range.htmlText;
|
1046 |
+
var layer = $("<layer>")[0];
|
1047 |
+
layer.appendChild(range.cloneContents());
|
1048 |
+
var html = layer.innerHTML;
|
1049 |
+
layer = null;
|
1050 |
+
return html;
|
1051 |
+
}
|
1052 |
+
|
1053 |
+
// selectedText - returns the current text selection or and empty string
|
1054 |
+
function selectedText(editor) {
|
1055 |
+
restoreRange(editor);
|
1056 |
+
if (ie) return getRange(editor).text;
|
1057 |
+
return getSelection(editor).toString();
|
1058 |
+
}
|
1059 |
+
|
1060 |
+
// showMessage - alert replacement
|
1061 |
+
function showMessage(editor, message, button) {
|
1062 |
+
var popup = createPopup("msg", editor.options, MSG_CLASS);
|
1063 |
+
popup.innerHTML = message;
|
1064 |
+
showPopup(editor, popup, button);
|
1065 |
+
}
|
1066 |
+
|
1067 |
+
// showPopup - shows a popup
|
1068 |
+
function showPopup(editor, popup, button) {
|
1069 |
+
|
1070 |
+
var offset, left, top, $popup = $(popup);
|
1071 |
+
|
1072 |
+
// Determine the popup location
|
1073 |
+
if (button) {
|
1074 |
+
var $button = $(button);
|
1075 |
+
offset = $button.offset();
|
1076 |
+
left = --offset.left;
|
1077 |
+
top = offset.top + $button.height();
|
1078 |
+
}
|
1079 |
+
else {
|
1080 |
+
var $toolbar = editor.$toolbar;
|
1081 |
+
offset = $toolbar.offset();
|
1082 |
+
left = Math.floor(($toolbar.width() - $popup.width()) / 2) + offset.left;
|
1083 |
+
top = offset.top + $toolbar.height() - 2;
|
1084 |
+
}
|
1085 |
+
|
1086 |
+
// Position and show the popup
|
1087 |
+
hidePopups();
|
1088 |
+
$popup.css({left: left, top: top})
|
1089 |
+
.show();
|
1090 |
+
|
1091 |
+
// Assign the popup button and click event handler
|
1092 |
+
if (button) {
|
1093 |
+
$.data(popup, BUTTON, button);
|
1094 |
+
$popup.bind(CLICK, {popup: popup}, $.proxy(popupClick, editor));
|
1095 |
+
}
|
1096 |
+
|
1097 |
+
// Focus the first input element if any
|
1098 |
+
setTimeout(function() {
|
1099 |
+
$popup.find(":text,textarea").eq(0).focus().select();
|
1100 |
+
}, 100);
|
1101 |
+
|
1102 |
+
}
|
1103 |
+
|
1104 |
+
// sourceMode - returns true if the textarea is showing
|
1105 |
+
function sourceMode(editor) {
|
1106 |
+
return editor.$area.is(":visible");
|
1107 |
+
}
|
1108 |
+
|
1109 |
+
// updateFrame - updates the iframe with the textarea contents
|
1110 |
+
function updateFrame(editor, checkForChange) {
|
1111 |
+
|
1112 |
+
var code = editor.$area.val(),
|
1113 |
+
options = editor.options,
|
1114 |
+
updateFrameCallback = options.updateFrame,
|
1115 |
+
$body = $(editor.doc.body);
|
1116 |
+
|
1117 |
+
// Check for textarea change to avoid unnecessary firing
|
1118 |
+
// of potentially heavy updateFrame callbacks.
|
1119 |
+
if (updateFrameCallback) {
|
1120 |
+
var sum = checksum(code);
|
1121 |
+
if (checkForChange && editor.areaChecksum === sum)
|
1122 |
+
return;
|
1123 |
+
editor.areaChecksum = sum;
|
1124 |
+
}
|
1125 |
+
|
1126 |
+
// Convert the textarea source code into iframe html
|
1127 |
+
var html = updateFrameCallback ? updateFrameCallback(code) : code;
|
1128 |
+
|
1129 |
+
// Prevent script injection attacks by html encoding script tags
|
1130 |
+
html = html.replace(/<(?=\/?script)/ig, "<");
|
1131 |
+
|
1132 |
+
// Update the iframe checksum
|
1133 |
+
if (options.updateTextArea)
|
1134 |
+
editor.frameChecksum = checksum(html);
|
1135 |
+
|
1136 |
+
// Update the iframe and trigger the change event
|
1137 |
+
if (html !== $body.html()) {
|
1138 |
+
$body.html(html);
|
1139 |
+
$(editor).triggerHandler(CHANGE);
|
1140 |
+
}
|
1141 |
+
|
1142 |
+
}
|
1143 |
+
|
1144 |
+
// updateTextArea - updates the textarea with the iframe contents
|
1145 |
+
function updateTextArea(editor, checkForChange) {
|
1146 |
+
|
1147 |
+
var html = $(editor.doc.body).html(),
|
1148 |
+
options = editor.options,
|
1149 |
+
updateTextAreaCallback = options.updateTextArea,
|
1150 |
+
$area = editor.$area;
|
1151 |
+
|
1152 |
+
// Check for iframe change to avoid unnecessary firing
|
1153 |
+
// of potentially heavy updateTextArea callbacks.
|
1154 |
+
if (updateTextAreaCallback) {
|
1155 |
+
var sum = checksum(html);
|
1156 |
+
if (checkForChange && editor.frameChecksum === sum)
|
1157 |
+
return;
|
1158 |
+
editor.frameChecksum = sum;
|
1159 |
+
}
|
1160 |
+
|
1161 |
+
// Convert the iframe html into textarea source code
|
1162 |
+
var code = updateTextAreaCallback ? updateTextAreaCallback(html) : html;
|
1163 |
+
|
1164 |
+
// Update the textarea checksum
|
1165 |
+
if (options.updateFrame)
|
1166 |
+
editor.areaChecksum = checksum(code);
|
1167 |
+
|
1168 |
+
// Update the textarea and trigger the change event
|
1169 |
+
if (code !== $area.val()) {
|
1170 |
+
$area.val(code);
|
1171 |
+
$(editor).triggerHandler(CHANGE);
|
1172 |
+
}
|
1173 |
+
|
1174 |
+
}
|
1175 |
+
|
1176 |
+
})(jQuery);
|
DC_MultiViewCal/src/Plugins/jquery.colorselect.js
ADDED
@@ -0,0 +1,161 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/// <reference path="../intellisense/jquery-1.2.6-vsdoc-cn.js" />
|
2 |
+
(function($) {
|
3 |
+
$.fn.DhoverClass = function(className) {
|
4 |
+
return $(this).hover(function() { $(this).addClass(className); }, function() { $(this).removeClass(className); });
|
5 |
+
}
|
6 |
+
function getDulyOffset(target, w, h) {
|
7 |
+
var pos = target.offset();
|
8 |
+
var height = target.outerHeight();
|
9 |
+
var newpos = { left: pos.left, top: pos.top + height - 1 }
|
10 |
+
var bw = $(document).width();
|
11 |
+
var bh = $(document).height();
|
12 |
+
if ((newpos.left + w) >= bw) {
|
13 |
+
newpos.left = bw - w - 2;
|
14 |
+
}
|
15 |
+
if ((newpos.top + h) >= bh && bw > newpos.top) {
|
16 |
+
newpos.top = pos.top - h - 2;
|
17 |
+
}
|
18 |
+
return newpos;
|
19 |
+
}
|
20 |
+
$.fn.colorselect = function(option) {
|
21 |
+
var options = $.extend({
|
22 |
+
hiddenid: null,
|
23 |
+
title: "Click to select color",
|
24 |
+
width: 141,
|
25 |
+
height: 100,
|
26 |
+
col:10,
|
27 |
+
paletteDefault: "f00",
|
28 |
+
index: "#ff0000",
|
29 |
+
cssClass: "bbit-dropdown"
|
30 |
+
}, option);
|
31 |
+
var me = $(this);
|
32 |
+
var id = me.attr("id");
|
33 |
+
if (id == null || id == "")
|
34 |
+
id = new Date();
|
35 |
+
me.addClass("containtdiv");
|
36 |
+
var leftId = "divleft" + id;
|
37 |
+
me.html("");
|
38 |
+
var leftdiv = $("<div/>").addClass("leftdiv").attr("id", leftId).appendTo(me);
|
39 |
+
var aitem = '<a href="#" id="{1}-{0}" key="#{0}" hidefocus="on"><em><span style="background:#{0};border:solid 1px #{3}" unselectable="on"> </span></em></a>';
|
40 |
+
|
41 |
+
|
42 |
+
|
43 |
+
var colors = options.colors.colors;
|
44 |
+
var borders = colors;
|
45 |
+
if (colors.length>options.col)
|
46 |
+
{
|
47 |
+
var rows = Math.ceil(colors.length/options.col);
|
48 |
+
options.width = 14*options.col+4;
|
49 |
+
options.height = 14*rows+4;
|
50 |
+
|
51 |
+
}
|
52 |
+
else
|
53 |
+
{
|
54 |
+
options.width = 14*colors.length+4;
|
55 |
+
options.height = 14+4;
|
56 |
+
}
|
57 |
+
//var d = "666666888888aaaaaabbbbbbdddddda32929cc3333d96666e69999f0c2c2b1365fdd4477e67399eea2bbf5c7d67a367a994499b373b3cca2cce1c7e15229a36633cc8c66d9b399e6d1c2f029527a336699668cb399b3ccc2d1e12952a33366cc668cd999b3e6c2d1f01b887a22aa9959bfb391d5ccbde6e128754e32926265ad8999c9b1c2dfd00d78131096184cb05288cb8cb8e0ba52880066aa008cbf40b3d580d1e6b388880eaaaa11bfbf4dd5d588e6e6b8ab8b00d6ae00e0c240ebd780f3e7b3be6d00ee8800f2a640f7c480fadcb3b1440edd5511e6804deeaa88f5ccb8865a5aa87070be9494d4b8b8e5d4d47057708c6d8ca992a9c6b6c6ddd3dd4e5d6c6274878997a5b1bac3d0d6db5a69867083a894a2beb8c1d4d4dae54a716c5c8d8785aaa5aec6c3cedddb6e6e41898951a7a77dc4c4a8dcdccb8d6f47b08b59c4a883d8c5ace7dcce";
|
58 |
+
//d= "FFF FCC FC9 FF9 FFC 9F9 9FF CFF CCF FCF " +
|
59 |
+
// "CCC F66 F96 FF6 FF3 6F9 3FF 6FF 99F F9F " +
|
60 |
+
// "BBB F00 F90 FC6 FF0 3F3 6CC 3CF 66C C6C " +
|
61 |
+
// "999 C00 F60 FC3 FC0 3C0 0CC 36F 63F C3C " +
|
62 |
+
// "666 900 C60 C93 990 090 399 33F 60C 939 " +
|
63 |
+
// "333 600 930 963 660 060 366 009 339 636 " +
|
64 |
+
// "000 300 630 633 330 030 033 006 309 303";
|
65 |
+
//for (var i = 0; i < d.length; i = i + 4) {
|
66 |
+
// colors.push(d.substr(i, 3));
|
67 |
+
// borders.push(d.substr(i, 3));
|
68 |
+
// //borders.push(d.substr(i - 6, 6));
|
69 |
+
//}
|
70 |
+
|
71 |
+
|
72 |
+
// return "#" + d.substring(c * 30 + i * 6, c * 30 + (i + 1) * 6);
|
73 |
+
var html = [];
|
74 |
+
for (var i = 0; i < colors.length; i++) {
|
75 |
+
var atemp = [];
|
76 |
+
|
77 |
+
var cucolor = colors[i];
|
78 |
+
atemp.push(cucolor);
|
79 |
+
atemp.push(id);
|
80 |
+
atemp.push(i);
|
81 |
+
if (colors[i]==options.paletteDefault)
|
82 |
+
atemp.push("000");
|
83 |
+
else
|
84 |
+
atemp.push(borders[i]);
|
85 |
+
var ahtml = StrFormatNoEncode(aitem, atemp);
|
86 |
+
html.push(ahtml);
|
87 |
+
}
|
88 |
+
//var blanka = '<a href="#" id="{1}-{0}" key="{2}" hidefocus="on"><em><span style=" text-align:center; width:46px;padding-top:2px; height:11px;border:solid 1px #8B7B8B;" unselectable="on">none</span></em></a>'
|
89 |
+
//var blank = [];
|
90 |
+
//blank.push("ffffff");
|
91 |
+
//blank.push(id);
|
92 |
+
//blank.push(-1);
|
93 |
+
//
|
94 |
+
//html.push(StrFormatNoEncode(blanka, blank));
|
95 |
+
var result = html.join('');
|
96 |
+
|
97 |
+
// var innerdiv = $("<div />").addClass("centerdiv").html(result);
|
98 |
+
// html.push('</div>');
|
99 |
+
var div = $("<div />").addClass("x-color-palette").css({
|
100 |
+
position: "absolute",
|
101 |
+
"z-index": "999",
|
102 |
+
"overflow": "auto",
|
103 |
+
width: options.width,
|
104 |
+
height: options.height,
|
105 |
+
display: "none"
|
106 |
+
//"border": "solid 1px #555"
|
107 |
+
|
108 |
+
}).attr("id", "div" + id).html(result).appendTo("body");
|
109 |
+
// to select color
|
110 |
+
$("#div" + id + " a").click(function(e) {
|
111 |
+
//debugger;
|
112 |
+
var co = $(this).attr("id");
|
113 |
+
|
114 |
+
var selectcolor = co.split('-')[1];
|
115 |
+
leftdiv.css("background", "#" + selectcolor);
|
116 |
+
var key = $(this).attr("key");
|
117 |
+
//if (key != -1) {
|
118 |
+
leftdiv.css("border", $(this).find("span").css("border"));
|
119 |
+
// }
|
120 |
+
//else {
|
121 |
+
//leftdiv.css("border", "none");
|
122 |
+
// }
|
123 |
+
if (options.hiddenid != null && options.hiddenid != "") {
|
124 |
+
$("#" + options.hiddenid).val(key);
|
125 |
+
}
|
126 |
+
div.hide();
|
127 |
+
return false;
|
128 |
+
});
|
129 |
+
// drop down
|
130 |
+
me.click(function() {
|
131 |
+
var pos = getDulyOffset(me, 120, 200);
|
132 |
+
div.css(pos);
|
133 |
+
div.show();
|
134 |
+
$(document).one("click", function(event) { div.hide(); });
|
135 |
+
return false;
|
136 |
+
});
|
137 |
+
// me.addClass(options.cssClass).DhoverClass("hover");
|
138 |
+
// get color index
|
139 |
+
function getcolorbyindex(index) {
|
140 |
+
//if (index >= 0 && index < colors.length)
|
141 |
+
// return colors[index];
|
142 |
+
//return "ffffff";
|
143 |
+
return index;
|
144 |
+
}
|
145 |
+
|
146 |
+
leftdiv.css("background", ((options.index != undefined && options.index != -1 && options.index != "") ? options.index : "#"+options.paletteDefault));
|
147 |
+
if (options.index != -1) {
|
148 |
+
leftdiv.css("border", " solid 1px " + "#" + borders[options.index]);
|
149 |
+
}
|
150 |
+
else {
|
151 |
+
leftdiv.css("border", "solid 1px #8B7B8B");
|
152 |
+
}
|
153 |
+
if (options.hiddenid != null && options.hiddenid != "") {
|
154 |
+
$("#" + options.hiddenid).val(options.index);
|
155 |
+
}
|
156 |
+
/* */
|
157 |
+
me.attr("title", options.title);
|
158 |
+
return me;
|
159 |
+
|
160 |
+
} // endof colorselect
|
161 |
+
})(jQuery);
|
DC_MultiViewCal/src/Plugins/jquery.dropdown.js
ADDED
@@ -0,0 +1,135 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/// <reference path="../intellisense/jquery-1.2.6-vsdoc-cn.js" />
|
2 |
+
(function($) {
|
3 |
+
$.fn.DhoverClass = function(className) {
|
4 |
+
return $(this).hover(function() { $(this).addClass(className); }, function() { $(this).removeClass(className); });
|
5 |
+
}
|
6 |
+
function getDulyOffset(target, w, h) {
|
7 |
+
var pos = target.offset();
|
8 |
+
var height = target.outerHeight();
|
9 |
+
var newpos = { left: pos.left, top: pos.top + height - 1 }
|
10 |
+
var bw = document.documentElement.clientWidth;
|
11 |
+
var bh = document.documentElement.clientHeight;
|
12 |
+
if ((newpos.left + w) >= bw) {
|
13 |
+
newpos.left = bw - w - 2;
|
14 |
+
}
|
15 |
+
if ((newpos.top + h) >= bh && bw > newpos.top) {
|
16 |
+
newpos.top = pos.top - h - 2;
|
17 |
+
}
|
18 |
+
return newpos;
|
19 |
+
}
|
20 |
+
function returnfalse() { return false; };
|
21 |
+
$.fn.dropdown = function(o) {
|
22 |
+
var options = $.extend({
|
23 |
+
vinputid: null,
|
24 |
+
cssClass: "bbit-dropdown",
|
25 |
+
containerCssClass: "dropdowncontainer",
|
26 |
+
dropwidth: false,
|
27 |
+
dropheight: "auto",
|
28 |
+
autoheight: true,
|
29 |
+
selectedchange: false,
|
30 |
+
items: [],
|
31 |
+
selecteditem: false,
|
32 |
+
parse: {
|
33 |
+
name: "list",
|
34 |
+
render: function(parent) {
|
35 |
+
var p = this.target;
|
36 |
+
var ul = $("<ul/>");
|
37 |
+
if (this.items && this.items.length > 0) {
|
38 |
+
$.each(this.items, function() {
|
39 |
+
var item = this;
|
40 |
+
var d = $("<div/>").html(item.text);
|
41 |
+
var li = $("<li/>").DhoverClass("hover").append(d)
|
42 |
+
.click(function() { p.SelectedChanged(item); });
|
43 |
+
if (item.classes && item.classes != "") {
|
44 |
+
d.addClass(item.classes);
|
45 |
+
}
|
46 |
+
ul.append(li);
|
47 |
+
});
|
48 |
+
}
|
49 |
+
parent.append(ul);
|
50 |
+
},
|
51 |
+
items: [],
|
52 |
+
setValue: function(item) { },
|
53 |
+
target: null
|
54 |
+
}
|
55 |
+
}, o);
|
56 |
+
var me = $(this);
|
57 |
+
var v;
|
58 |
+
if (options.vinputid) {
|
59 |
+
v = $("#" + options.vinputid);
|
60 |
+
}
|
61 |
+
if (options.selecteditem) {
|
62 |
+
me.val(options.selecteditem.text);
|
63 |
+
if (v && options.selecteditem.value) {
|
64 |
+
v.val(options.selecteditem.value);
|
65 |
+
}
|
66 |
+
}
|
67 |
+
var requireCss = { height: 18, "padding-top": "1px", "padding-bottom": "1px" };
|
68 |
+
me.css(requireCss).addClass(options.cssClass).DhoverClass("hover");
|
69 |
+
if (!options.dropwidth) {
|
70 |
+
options.dropwidth = me.outerWidth();
|
71 |
+
}
|
72 |
+
var d = $("<div/>").addClass(options.containerCssClass)
|
73 |
+
.css({ position: "absolute", "z-index": "999", "overflow": "auto", width: options.dropwidth, display: "none", "border": "solid 1px #555", background: "#fff" })
|
74 |
+
.click(function(event) { event.stopPropagation(); })
|
75 |
+
.appendTo($("body"));
|
76 |
+
if (options.autoheight) {
|
77 |
+
d.css("max-height", options.dropheight);
|
78 |
+
}
|
79 |
+
else {
|
80 |
+
d.css("height", options.dropheight);
|
81 |
+
}
|
82 |
+
|
83 |
+
if ($.browser.msie) {
|
84 |
+
if (parseFloat($.browser.version) <= 6) {
|
85 |
+
var ie6hack = $("<div/>").css({ position: "absolute", "z-index": "-2", "overflow": "hidden", "height": "100%", width: "100%" });
|
86 |
+
ie6hack.append($('<iframe style="position:absolute;z-index:-1;width:100%;height:100%;top:0;left:0;scrolling:no;" frameborder="0" src="about:blank"></iframe>'));
|
87 |
+
d.append(ie6hack);
|
88 |
+
}
|
89 |
+
}
|
90 |
+
me.click(function() {
|
91 |
+
var m = this;
|
92 |
+
if (d.attr("isinited") != "true") {
|
93 |
+
options.parse.items = options.items;
|
94 |
+
if (options.selecteditem) {
|
95 |
+
options.parse.setValue.call(d, options.selecteditem);
|
96 |
+
}
|
97 |
+
options.parse.render(d);
|
98 |
+
d.attr("isinited", "true");
|
99 |
+
}
|
100 |
+
var pos = getDulyOffset(me, options.dropwidth, options.dropheight);
|
101 |
+
d.css(pos);
|
102 |
+
d.show();
|
103 |
+
if ($.browser.msie) {
|
104 |
+
if (parseFloat($.browser.version) <= 6) {
|
105 |
+
var h = d.height();
|
106 |
+
if (h > options.dropheight) {
|
107 |
+
d.height(options.dropheight);
|
108 |
+
}
|
109 |
+
}
|
110 |
+
}
|
111 |
+
$(document).one("click", function(event) { d.hide(); });
|
112 |
+
return false;
|
113 |
+
});
|
114 |
+
me.SelectedChanged = function(t) {
|
115 |
+
var b = true;
|
116 |
+
if (options.selectedchange) {
|
117 |
+
b = options.selectedchange.apply(me, [t]);
|
118 |
+
}
|
119 |
+
if (b != false) {
|
120 |
+
me.val(t.text);
|
121 |
+
if (v && t.value) {
|
122 |
+
v.val(t.value);
|
123 |
+
}
|
124 |
+
}
|
125 |
+
d.hide();
|
126 |
+
|
127 |
+
};
|
128 |
+
me.Cancel = function() {
|
129 |
+
d.hide();
|
130 |
+
}
|
131 |
+
options.parse.target = me;
|
132 |
+
return me;
|
133 |
+
}
|
134 |
+
|
135 |
+
})(jQuery);
|
DC_MultiViewCal/src/Plugins/jquery.form.js
ADDED
@@ -0,0 +1,461 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
(function($) {
|
2 |
+
$.fn.ajaxSubmit = function(options) {
|
3 |
+
if (!this.length) {
|
4 |
+
log('ajaxSubmit: skipping submit process - no element selected');
|
5 |
+
return this;
|
6 |
+
}
|
7 |
+
|
8 |
+
if (typeof options == 'function')
|
9 |
+
options = { success: options };
|
10 |
+
|
11 |
+
options = $.extend({
|
12 |
+
url: this.attr('action') || window.location.toString(),
|
13 |
+
type: this.attr('method') || 'GET'
|
14 |
+
}, options || {});
|
15 |
+
|
16 |
+
var veto = {};
|
17 |
+
this.trigger('form-pre-serialize', [this, options, veto]);
|
18 |
+
if (veto.veto) {
|
19 |
+
log('ajaxSubmit: submit vetoed via form-pre-serialize trigger');
|
20 |
+
return this;
|
21 |
+
}
|
22 |
+
|
23 |
+
if (options.beforeSerialize && options.beforeSerialize(this, options) === false) {
|
24 |
+
log('ajaxSubmit: submit aborted via beforeSerialize callback');
|
25 |
+
return this;
|
26 |
+
}
|
27 |
+
|
28 |
+
var a = this.formToArray(options.semantic);
|
29 |
+
if (options.data) {
|
30 |
+
options.extraData = options.data;
|
31 |
+
for (var n in options.data) {
|
32 |
+
if(options.data[n] instanceof Array) {
|
33 |
+
for (var k in options.data[n])
|
34 |
+
a.push( { name: n, value: options.data[n][k] } )
|
35 |
+
}
|
36 |
+
else
|
37 |
+
a.push( { name: n, value: options.data[n] } );
|
38 |
+
}
|
39 |
+
}
|
40 |
+
|
41 |
+
if (options.beforeSubmit && options.beforeSubmit(a, this, options) === false) {
|
42 |
+
log('ajaxSubmit: submit aborted via beforeSubmit callback');
|
43 |
+
return this;
|
44 |
+
}
|
45 |
+
|
46 |
+
|
47 |
+
this.trigger('form-submit-validate', [a, this, options, veto]);
|
48 |
+
if (veto.veto) {
|
49 |
+
log('ajaxSubmit: submit vetoed via form-submit-validate trigger');
|
50 |
+
return this;
|
51 |
+
}
|
52 |
+
|
53 |
+
var q = $.param(a);
|
54 |
+
|
55 |
+
if (options.type.toUpperCase() == 'GET') {
|
56 |
+
options.url += (options.url.indexOf('?') >= 0 ? '&' : '?') + q;
|
57 |
+
options.data = null;
|
58 |
+
}
|
59 |
+
else
|
60 |
+
options.data = q;
|
61 |
+
|
62 |
+
var $form = this, callbacks = [];
|
63 |
+
if (options.resetForm) callbacks.push(function() { $form.resetForm(); });
|
64 |
+
if (options.clearForm) callbacks.push(function() { $form.clearForm(); });
|
65 |
+
|
66 |
+
if (!options.dataType && options.target) {
|
67 |
+
var oldSuccess = options.success || function(){};
|
68 |
+
callbacks.push(function(data) {
|
69 |
+
$(options.target).html(data).each(oldSuccess, arguments);
|
70 |
+
});
|
71 |
+
}
|
72 |
+
else if (options.success)
|
73 |
+
callbacks.push(options.success);
|
74 |
+
|
75 |
+
options.success = function(data, status) {
|
76 |
+
for (var i=0, max=callbacks.length; i < max; i++)
|
77 |
+
callbacks[i].apply(options, [data, status, $form]);
|
78 |
+
};
|
79 |
+
|
80 |
+
var files = $('input:file', this).fieldValue();
|
81 |
+
var found = false;
|
82 |
+
for (var j=0; j < files.length; j++)
|
83 |
+
if (files[j])
|
84 |
+
found = true;
|
85 |
+
|
86 |
+
if (options.iframe || found) {
|
87 |
+
if ($.browser.safari && options.closeKeepAlive)
|
88 |
+
$.get(options.closeKeepAlive, fileUpload);
|
89 |
+
else
|
90 |
+
fileUpload();
|
91 |
+
}
|
92 |
+
else
|
93 |
+
$.ajax(options);
|
94 |
+
this.trigger('form-submit-notify', [this, options]);
|
95 |
+
return this;
|
96 |
+
|
97 |
+
function fileUpload() {
|
98 |
+
var form = $form[0];
|
99 |
+
|
100 |
+
if ($(':input[@name=submit]', form).length) {
|
101 |
+
alert('Error: Form elements must not be named "submit".');
|
102 |
+
return;
|
103 |
+
}
|
104 |
+
|
105 |
+
var opts = $.extend({}, $.ajaxSettings, options);
|
106 |
+
var s = jQuery.extend(true, {}, $.extend(true, {}, $.ajaxSettings), opts);
|
107 |
+
|
108 |
+
var id = 'jqFormIO' + (new Date().getTime());
|
109 |
+
var $io = $('<iframe id="' + id + '" name="' + id + '" />');
|
110 |
+
var io = $io[0];
|
111 |
+
|
112 |
+
if ($.browser.msie || $.browser.opera)
|
113 |
+
io.src = 'javascript:false;document.write("");';
|
114 |
+
$io.css({ position: 'absolute', top: '-1000px', left: '-1000px' });
|
115 |
+
|
116 |
+
var xhr = {
|
117 |
+
aborted: 0,
|
118 |
+
responseText: null,
|
119 |
+
responseXML: null,
|
120 |
+
status: 0,
|
121 |
+
statusText: 'n/a',
|
122 |
+
getAllResponseHeaders: function() {},
|
123 |
+
getResponseHeader: function() {},
|
124 |
+
setRequestHeader: function() {},
|
125 |
+
abort: function() {
|
126 |
+
this.aborted = 1;
|
127 |
+
$io.attr('src','about:blank');
|
128 |
+
}
|
129 |
+
};
|
130 |
+
|
131 |
+
var g = opts.global;
|
132 |
+
|
133 |
+
if (g && ! $.active++) $.event.trigger("ajaxStart");
|
134 |
+
if (g) $.event.trigger("ajaxSend", [xhr, opts]);
|
135 |
+
|
136 |
+
if (s.beforeSend && s.beforeSend(xhr, s) === false) {
|
137 |
+
s.global && jQuery.active--;
|
138 |
+
return;
|
139 |
+
}
|
140 |
+
if (xhr.aborted)
|
141 |
+
return;
|
142 |
+
|
143 |
+
var cbInvoked = 0;
|
144 |
+
var timedOut = 0;
|
145 |
+
|
146 |
+
var sub = form.clk;
|
147 |
+
if (sub) {
|
148 |
+
var n = sub.name;
|
149 |
+
if (n && !sub.disabled) {
|
150 |
+
options.extraData = options.extraData || {};
|
151 |
+
options.extraData[n] = sub.value;
|
152 |
+
if (sub.type == "image") {
|
153 |
+
options.extraData[name+'.x'] = form.clk_x;
|
154 |
+
options.extraData[name+'.y'] = form.clk_y;
|
155 |
+
}
|
156 |
+
}
|
157 |
+
}
|
158 |
+
|
159 |
+
setTimeout(function() {
|
160 |
+
var t = $form.attr('target'), a = $form.attr('action');
|
161 |
+
$form.attr({
|
162 |
+
target: id,
|
163 |
+
method: 'POST',
|
164 |
+
action: opts.url
|
165 |
+
});
|
166 |
+
|
167 |
+
if (! options.skipEncodingOverride) {
|
168 |
+
$form.attr({
|
169 |
+
encoding: 'multipart/form-data',
|
170 |
+
enctype: 'multipart/form-data'
|
171 |
+
});
|
172 |
+
}
|
173 |
+
|
174 |
+
|
175 |
+
if (opts.timeout)
|
176 |
+
setTimeout(function() { timedOut = true; cb(); }, opts.timeout);
|
177 |
+
|
178 |
+
var extraInputs = [];
|
179 |
+
try {
|
180 |
+
if (options.extraData)
|
181 |
+
for (var n in options.extraData)
|
182 |
+
extraInputs.push(
|
183 |
+
$('<input type="hidden" name="'+n+'" value="'+options.extraData[n]+'" />')
|
184 |
+
.appendTo(form)[0]);
|
185 |
+
|
186 |
+
$io.appendTo('body');
|
187 |
+
io.attachEvent ? io.attachEvent('onload', cb) : io.addEventListener('load', cb, false);
|
188 |
+
form.submit();
|
189 |
+
}
|
190 |
+
finally {
|
191 |
+
$form.attr('action', a);
|
192 |
+
t ? $form.attr('target', t) : $form.removeAttr('target');
|
193 |
+
$(extraInputs).remove();
|
194 |
+
}
|
195 |
+
}, 10);
|
196 |
+
|
197 |
+
function cb() {
|
198 |
+
if (cbInvoked++) return;
|
199 |
+
|
200 |
+
io.detachEvent ? io.detachEvent('onload', cb) : io.removeEventListener('load', cb, false);
|
201 |
+
|
202 |
+
var operaHack = 0;
|
203 |
+
var ok = true;
|
204 |
+
try {
|
205 |
+
if (timedOut) throw 'timeout';
|
206 |
+
|
207 |
+
var data, doc;
|
208 |
+
|
209 |
+
doc = io.contentWindow ? io.contentWindow.document : io.contentDocument ? io.contentDocument : io.document;
|
210 |
+
|
211 |
+
if (doc.body == null && !operaHack && $.browser.opera) {
|
212 |
+
operaHack = 1;
|
213 |
+
cbInvoked--;
|
214 |
+
setTimeout(cb, 100);
|
215 |
+
return;
|
216 |
+
}
|
217 |
+
|
218 |
+
xhr.responseText = doc.body ? doc.body.innerHTML : null;
|
219 |
+
xhr.responseXML = doc.XMLDocument ? doc.XMLDocument : doc;
|
220 |
+
xhr.getResponseHeader = function(header){
|
221 |
+
var headers = {'content-type': opts.dataType};
|
222 |
+
return headers[header];
|
223 |
+
};
|
224 |
+
|
225 |
+
if (opts.dataType == 'json' || opts.dataType == 'script') {
|
226 |
+
var ta = doc.getElementsByTagName('textarea')[0];
|
227 |
+
xhr.responseText = ta ? ta.value : xhr.responseText;
|
228 |
+
}
|
229 |
+
else if (opts.dataType == 'xml' && !xhr.responseXML && xhr.responseText != null) {
|
230 |
+
xhr.responseXML = toXml(xhr.responseText);
|
231 |
+
}
|
232 |
+
data = $.httpData(xhr, opts.dataType);
|
233 |
+
}
|
234 |
+
catch(e){
|
235 |
+
ok = false;
|
236 |
+
$.handleError(opts, xhr, 'error', e);
|
237 |
+
}
|
238 |
+
|
239 |
+
if (ok) {
|
240 |
+
opts.success(data, 'success');
|
241 |
+
if (g) $.event.trigger("ajaxSuccess", [xhr, opts]);
|
242 |
+
}
|
243 |
+
if (g) $.event.trigger("ajaxComplete", [xhr, opts]);
|
244 |
+
if (g && ! --$.active) $.event.trigger("ajaxStop");
|
245 |
+
if (opts.complete) opts.complete(xhr, ok ? 'success' : 'error');
|
246 |
+
|
247 |
+
// clean up
|
248 |
+
setTimeout(function() {
|
249 |
+
$io.remove();
|
250 |
+
xhr.responseXML = null;
|
251 |
+
}, 100);
|
252 |
+
};
|
253 |
+
|
254 |
+
function toXml(s, doc) {
|
255 |
+
if (window.ActiveXObject) {
|
256 |
+
doc = new ActiveXObject('Microsoft.XMLDOM');
|
257 |
+
doc.async = 'false';
|
258 |
+
doc.loadXML(s);
|
259 |
+
}
|
260 |
+
else
|
261 |
+
doc = (new DOMParser()).parseFromString(s, 'text/xml');
|
262 |
+
return (doc && doc.documentElement && doc.documentElement.tagName != 'parsererror') ? doc : null;
|
263 |
+
};
|
264 |
+
};
|
265 |
+
};
|
266 |
+
|
267 |
+
$.fn.ajaxForm = function(options) {
|
268 |
+
return this.ajaxFormUnbind().bind('submit.form-plugin',function() {
|
269 |
+
$(this).ajaxSubmit(options);
|
270 |
+
return false;
|
271 |
+
}).each(function() {
|
272 |
+
$(":submit,input:image", this).bind('click.form-plugin',function(e) {
|
273 |
+
var form = this.form;
|
274 |
+
form.clk = this;
|
275 |
+
if (this.type == 'image') {
|
276 |
+
if (e.offsetX != undefined) {
|
277 |
+
form.clk_x = e.offsetX;
|
278 |
+
form.clk_y = e.offsetY;
|
279 |
+
} else if (typeof $.fn.offset == 'function') { // try to use dimensions plugin
|
280 |
+
var offset = $(this).offset();
|
281 |
+
form.clk_x = e.pageX - offset.left;
|
282 |
+
form.clk_y = e.pageY - offset.top;
|
283 |
+
} else {
|
284 |
+
form.clk_x = e.pageX - this.offsetLeft;
|
285 |
+
form.clk_y = e.pageY - this.offsetTop;
|
286 |
+
}
|
287 |
+
}
|
288 |
+
// clear form vars
|
289 |
+
setTimeout(function() { form.clk = form.clk_x = form.clk_y = null; }, 10);
|
290 |
+
});
|
291 |
+
});
|
292 |
+
};
|
293 |
+
|
294 |
+
$.fn.ajaxFormUnbind = function() {
|
295 |
+
this.unbind('submit.form-plugin');
|
296 |
+
return this.each(function() {
|
297 |
+
$(":submit,input:image", this).unbind('click.form-plugin');
|
298 |
+
});
|
299 |
+
|
300 |
+
};
|
301 |
+
|
302 |
+
$.fn.formToArray = function(semantic) {
|
303 |
+
var a = [];
|
304 |
+
if (this.length == 0) return a;
|
305 |
+
|
306 |
+
var form = this[0];
|
307 |
+
var els = semantic ? form.getElementsByTagName('*') : form.elements;
|
308 |
+
if (!els) return a;
|
309 |
+
for(var i=0, max=els.length; i < max; i++) {
|
310 |
+
var el = els[i];
|
311 |
+
var n = el.name;
|
312 |
+
if (!n) continue;
|
313 |
+
|
314 |
+
if (semantic && form.clk && el.type == "image") {
|
315 |
+
// handle image inputs on the fly when semantic == true
|
316 |
+
if(!el.disabled && form.clk == el)
|
317 |
+
a.push({name: n+'.x', value: form.clk_x}, {name: n+'.y', value: form.clk_y});
|
318 |
+
continue;
|
319 |
+
}
|
320 |
+
|
321 |
+
var v = $.fieldValue(el, true);
|
322 |
+
if (v && v.constructor == Array) {
|
323 |
+
for(var j=0, jmax=v.length; j < jmax; j++)
|
324 |
+
a.push({name: n, value: v[j]});
|
325 |
+
}
|
326 |
+
else if (v !== null && typeof v != 'undefined')
|
327 |
+
a.push({name: n, value: v});
|
328 |
+
}
|
329 |
+
|
330 |
+
if (!semantic && form.clk) {
|
331 |
+
// input type=='image' are not found in elements array! handle them here
|
332 |
+
var inputs = form.getElementsByTagName("input");
|
333 |
+
for(var i=0, max=inputs.length; i < max; i++) {
|
334 |
+
var input = inputs[i];
|
335 |
+
var n = input.name;
|
336 |
+
if(n && !input.disabled && input.type == "image" && form.clk == input)
|
337 |
+
a.push({name: n+'.x', value: form.clk_x}, {name: n+'.y', value: form.clk_y});
|
338 |
+
}
|
339 |
+
}
|
340 |
+
return a;
|
341 |
+
};
|
342 |
+
|
343 |
+
$.fn.formSerialize = function(semantic) {
|
344 |
+
return $.param(this.formToArray(semantic));
|
345 |
+
};
|
346 |
+
|
347 |
+
$.fn.fieldSerialize = function(successful) {
|
348 |
+
var a = [];
|
349 |
+
this.each(function() {
|
350 |
+
var n = this.name;
|
351 |
+
if (!n) return;
|
352 |
+
var v = $.fieldValue(this, successful);
|
353 |
+
if (v && v.constructor == Array) {
|
354 |
+
for (var i=0,max=v.length; i < max; i++)
|
355 |
+
a.push({name: n, value: v[i]});
|
356 |
+
}
|
357 |
+
else if (v !== null && typeof v != 'undefined')
|
358 |
+
a.push({name: this.name, value: v});
|
359 |
+
});
|
360 |
+
return $.param(a);
|
361 |
+
};
|
362 |
+
|
363 |
+
|
364 |
+
$.fn.fieldValue = function(successful) {
|
365 |
+
for (var val=[], i=0, max=this.length; i < max; i++) {
|
366 |
+
var el = this[i];
|
367 |
+
var v = $.fieldValue(el, successful);
|
368 |
+
if (v === null || typeof v == 'undefined' || (v.constructor == Array && !v.length))
|
369 |
+
continue;
|
370 |
+
v.constructor == Array ? $.merge(val, v) : val.push(v);
|
371 |
+
}
|
372 |
+
return val;
|
373 |
+
};
|
374 |
+
|
375 |
+
$.fieldValue = function(el, successful) {
|
376 |
+
var n = el.name, t = el.type, tag = el.tagName.toLowerCase();
|
377 |
+
if (typeof successful == 'undefined') successful = true;
|
378 |
+
|
379 |
+
if (successful && (!n || el.disabled || t == 'reset' || t == 'button' ||
|
380 |
+
(t == 'checkbox' || t == 'radio') && !el.checked ||
|
381 |
+
(t == 'submit' || t == 'image') && el.form && el.form.clk != el ||
|
382 |
+
tag == 'select' && el.selectedIndex == -1))
|
383 |
+
return null;
|
384 |
+
|
385 |
+
if (tag == 'select') {
|
386 |
+
var index = el.selectedIndex;
|
387 |
+
if (index < 0) return null;
|
388 |
+
var a = [], ops = el.options;
|
389 |
+
var one = (t == 'select-one');
|
390 |
+
var max = (one ? index+1 : ops.length);
|
391 |
+
for(var i=(one ? index : 0); i < max; i++) {
|
392 |
+
var op = ops[i];
|
393 |
+
if (op.selected) {
|
394 |
+
var v = $.browser.msie && !(op.attributes['value'].specified) ? op.text : op.value;
|
395 |
+
if (one) return v;
|
396 |
+
a.push(v);
|
397 |
+
}
|
398 |
+
}
|
399 |
+
return a;
|
400 |
+
}
|
401 |
+
return el.value;
|
402 |
+
};
|
403 |
+
|
404 |
+
$.fn.clearForm = function() {
|
405 |
+
return this.each(function() {
|
406 |
+
$('input,select,textarea', this).clearFields();
|
407 |
+
});
|
408 |
+
};
|
409 |
+
|
410 |
+
|
411 |
+
$.fn.clearFields = $.fn.clearInputs = function() {
|
412 |
+
return this.each(function() {
|
413 |
+
var t = this.type, tag = this.tagName.toLowerCase();
|
414 |
+
if (t == 'text' || t == 'password' || tag == 'textarea')
|
415 |
+
this.value = '';
|
416 |
+
else if (t == 'checkbox' || t == 'radio')
|
417 |
+
this.checked = false;
|
418 |
+
else if (tag == 'select')
|
419 |
+
this.selectedIndex = -1;
|
420 |
+
});
|
421 |
+
};
|
422 |
+
|
423 |
+
|
424 |
+
$.fn.resetForm = function() {
|
425 |
+
return this.each(function() {
|
426 |
+
if (typeof this.reset == 'function' || (typeof this.reset == 'object' && !this.reset.nodeType))
|
427 |
+
this.reset();
|
428 |
+
});
|
429 |
+
};
|
430 |
+
|
431 |
+
$.fn.enable = function(b) {
|
432 |
+
if (b == undefined) b = true;
|
433 |
+
return this.each(function() {
|
434 |
+
this.disabled = !b
|
435 |
+
});
|
436 |
+
};
|
437 |
+
|
438 |
+
|
439 |
+
$.fn.selected = function(select) {
|
440 |
+
if (select == undefined) select = true;
|
441 |
+
return this.each(function() {
|
442 |
+
var t = this.type;
|
443 |
+
if (t == 'checkbox' || t == 'radio')
|
444 |
+
this.checked = select;
|
445 |
+
else if (this.tagName.toLowerCase() == 'option') {
|
446 |
+
var $sel = $(this).parent('select');
|
447 |
+
if (select && $sel[0] && $sel[0].type == 'select-one') {
|
448 |
+
// deselect all other options
|
449 |
+
$sel.find('option').selected(false);
|
450 |
+
}
|
451 |
+
this.selected = select;
|
452 |
+
}
|
453 |
+
});
|
454 |
+
};
|
455 |
+
|
456 |
+
|
457 |
+
function log() {
|
458 |
+
if ($.fn.ajaxSubmit.debug && window.console && window.console.log)
|
459 |
+
window.console.log('[jquery.form] ' + Array.prototype.join.call(arguments,''));
|
460 |
+
};
|
461 |
+
})(jQuery);
|
{js → DC_MultiViewCal/src/Plugins}/jquery.validate.js
RENAMED
@@ -4,15 +4,13 @@
|
|
4 |
* http://bassistance.de/jquery-plugins/jquery-plugin-validation/
|
5 |
* http://docs.jquery.com/Plugins/Validation
|
6 |
*
|
7 |
-
* Copyright (c) 2012
|
8 |
*
|
9 |
* Dual licensed under the MIT and GPL licenses:
|
10 |
* http://www.opensource.org/licenses/mit-license.php
|
11 |
* http://www.gnu.org/licenses/gpl.html
|
12 |
*/
|
13 |
-
|
14 |
-
|
15 |
-
fbuilderjQuery(function(){
|
16 |
(function($) {
|
17 |
|
18 |
$.extend($.fn, {
|
@@ -282,7 +280,6 @@ $.extend($.validator, {
|
|
282 |
creditcard: "Please enter a valid credit card number.",
|
283 |
equalTo: "Please enter the same value again.",
|
284 |
accept: "Please enter a value with a valid extension.",
|
285 |
-
upload_size: $.validator.format("The file you've chosen is too big, maximum is {0} kB."),
|
286 |
maxlength: $.validator.format("Please enter no more than {0} characters."),
|
287 |
minlength: $.validator.format("Please enter at least {0} characters."),
|
288 |
rangelength: $.validator.format("Please enter a value between {0} and {1} characters long."),
|
@@ -552,7 +549,7 @@ $.extend($.validator, {
|
|
552 |
}
|
553 |
} catch(e) {
|
554 |
if ( this.settings.debug && window.console ) {
|
555 |
-
console.log("exception
|
556 |
}
|
557 |
throw e;
|
558 |
}
|
@@ -1170,7 +1167,7 @@ $.extend($.validator, {
|
|
1170 |
// deprecated, use $.validator.format instead
|
1171 |
$.format = $.validator.format;
|
1172 |
|
1173 |
-
}(
|
1174 |
|
1175 |
// ajax mode: abort
|
1176 |
// usage: $.ajax({ mode: "abort"[, port: "uniqueport"]});
|
@@ -1203,7 +1200,7 @@ $.format = $.validator.format;
|
|
1203 |
return ajax.apply(this, arguments);
|
1204 |
};
|
1205 |
}
|
1206 |
-
}(
|
1207 |
|
1208 |
// provides cross-browser focusin and focusout events
|
1209 |
// IE has native support, in other browsers, use event caputuring (neither bubbles)
|
@@ -1213,7 +1210,7 @@ $.format = $.validator.format;
|
|
1213 |
(function($) {
|
1214 |
// only implement if not provided by jQuery core (since 1.4)
|
1215 |
// TODO verify if jQuery 1.4's implementation is compatible with older jQuery special-event APIs
|
1216 |
-
if (!
|
1217 |
$.each({
|
1218 |
focus: 'focusin',
|
1219 |
blur: 'focusout'
|
@@ -1249,5 +1246,4 @@ $.format = $.validator.format;
|
|
1249 |
});
|
1250 |
}
|
1251 |
});
|
1252 |
-
}(
|
1253 |
-
});
|
4 |
* http://bassistance.de/jquery-plugins/jquery-plugin-validation/
|
5 |
* http://docs.jquery.com/Plugins/Validation
|
6 |
*
|
7 |
+
* Copyright (c) 2012 J�rn Zaefferer
|
8 |
*
|
9 |
* Dual licensed under the MIT and GPL licenses:
|
10 |
* http://www.opensource.org/licenses/mit-license.php
|
11 |
* http://www.gnu.org/licenses/gpl.html
|
12 |
*/
|
13 |
+
|
|
|
|
|
14 |
(function($) {
|
15 |
|
16 |
$.extend($.fn, {
|
280 |
creditcard: "Please enter a valid credit card number.",
|
281 |
equalTo: "Please enter the same value again.",
|
282 |
accept: "Please enter a value with a valid extension.",
|
|
|
283 |
maxlength: $.validator.format("Please enter no more than {0} characters."),
|
284 |
minlength: $.validator.format("Please enter at least {0} characters."),
|
285 |
rangelength: $.validator.format("Please enter a value between {0} and {1} characters long."),
|
549 |
}
|
550 |
} catch(e) {
|
551 |
if ( this.settings.debug && window.console ) {
|
552 |
+
console.log("exception occured when checking element " + element.id + ", check the '" + rule.method + "' method", e);
|
553 |
}
|
554 |
throw e;
|
555 |
}
|
1167 |
// deprecated, use $.validator.format instead
|
1168 |
$.format = $.validator.format;
|
1169 |
|
1170 |
+
}(jQuery));
|
1171 |
|
1172 |
// ajax mode: abort
|
1173 |
// usage: $.ajax({ mode: "abort"[, port: "uniqueport"]});
|
1200 |
return ajax.apply(this, arguments);
|
1201 |
};
|
1202 |
}
|
1203 |
+
}(jQuery));
|
1204 |
|
1205 |
// provides cross-browser focusin and focusout events
|
1206 |
// IE has native support, in other browsers, use event caputuring (neither bubbles)
|
1210 |
(function($) {
|
1211 |
// only implement if not provided by jQuery core (since 1.4)
|
1212 |
// TODO verify if jQuery 1.4's implementation is compatible with older jQuery special-event APIs
|
1213 |
+
if (!jQuery.event.special.focusin && !jQuery.event.special.focusout && document.addEventListener) {
|
1214 |
$.each({
|
1215 |
focus: 'focusin',
|
1216 |
blur: 'focusout'
|
1246 |
});
|
1247 |
}
|
1248 |
});
|
1249 |
+
}(jQuery));
|
|
DC_MultiViewCal/src/Plugins/multiview.js
ADDED
@@ -0,0 +1,536 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
$jc = jQuery.noConflict();
|
2 |
+
function waitvisible(gridcontainer)
|
3 |
+
{
|
4 |
+
if ($jc(gridcontainer).width()==0)
|
5 |
+
setTimeout("waitvisible('"+gridcontainer+"')",100);
|
6 |
+
else
|
7 |
+
$jc(gridcontainer).reload2();
|
8 |
+
}
|
9 |
+
function fluidDialog() {
|
10 |
+
var $visible = $jc(".ui-dialog:visible");
|
11 |
+
// each open dialog
|
12 |
+
$visible.each(function () {
|
13 |
+
var $this = $jc(this);
|
14 |
+
var dialog = $this.find(".ui-dialog-content");
|
15 |
+
if (dialog.dialog("option","fluid")) {
|
16 |
+
var wWidth = $jc(window).width();
|
17 |
+
// check window width against dialog width
|
18 |
+
if (wWidth < (parseInt(dialog.dialog("option","maxWidth")) + 50)) {
|
19 |
+
// keep dialog from filling entire screen
|
20 |
+
$this.css("max-width", "90%");
|
21 |
+
} else {
|
22 |
+
// fix maxWidth bug
|
23 |
+
$this.css("max-width", dialog.dialog("option","maxWidth") + "px");
|
24 |
+
}
|
25 |
+
//reposition dialog
|
26 |
+
dialog.dialog("option","position", dialog.dialog("option","position"));
|
27 |
+
}
|
28 |
+
});
|
29 |
+
|
30 |
+
}
|
31 |
+
$jc(window).resize(function () {
|
32 |
+
fluidDialog();
|
33 |
+
});
|
34 |
+
$jc(document).on("dialogopen", ".ui-dialog", function (event, ui) {
|
35 |
+
fluidDialog();
|
36 |
+
});
|
37 |
+
window.$ = jQuery;
|
38 |
+
function initMultiViewCal(container,calendarId,config)
|
39 |
+
{
|
40 |
+
$jc(document).ready(function($jc) {
|
41 |
+
(function( $jc ) {
|
42 |
+
var def = {
|
43 |
+
numberOfMonths:6,
|
44 |
+
viewNew : config.edition,
|
45 |
+
viewToday : config.btoday,
|
46 |
+
viewDay : false,
|
47 |
+
viewWeek : false,
|
48 |
+
viewMonth : false,
|
49 |
+
viewNMonth : false,
|
50 |
+
viewNDays : false,
|
51 |
+
viewList : false,
|
52 |
+
numberOfDays : 10,
|
53 |
+
list_start:"", //"","now" or string compatible with strtotime
|
54 |
+
list_end:"", //"","now" or string compatible with strtotime
|
55 |
+
list_order:"asc",//asc or desc
|
56 |
+
list_totalEvents:0, //0 = unlimited
|
57 |
+
list_eventsPerPage:10,
|
58 |
+
list_readmore_numberofwords:0, //0 = unlimited,
|
59 |
+
viewRefresh : config.brefresh,
|
60 |
+
viewNavigation : config.bnavigation,
|
61 |
+
view: config.viewdefault, //'day','week','month','nMonth','nDays'
|
62 |
+
weekstartday:config.start_weekday,
|
63 |
+
showtooltip:false,
|
64 |
+
tooltipon:1,
|
65 |
+
shownavigate:false,
|
66 |
+
navigateurl:config.url,
|
67 |
+
target:0,
|
68 |
+
cssStyle:"ui-darkness",
|
69 |
+
readonly:!config.edition,
|
70 |
+
nmonths:12,
|
71 |
+
dialogWidth:300,
|
72 |
+
dialogCloseAuto:false,
|
73 |
+
height:0,
|
74 |
+
showtooltipdwm:false,
|
75 |
+
viewWeekDays:[1,1,1,1,1,1,1],
|
76 |
+
militaryTime:true,
|
77 |
+
path:"",
|
78 |
+
hoursStart:0,
|
79 |
+
hoursEnd:23,
|
80 |
+
cellheight:42,
|
81 |
+
rowsByCategory:"",
|
82 |
+
rowsList:"",
|
83 |
+
dayWithColumns:"",
|
84 |
+
dayWithTime:true,
|
85 |
+
thecontainer:container,
|
86 |
+
userAdd:true,
|
87 |
+
userEdit:true,
|
88 |
+
userDel:true,
|
89 |
+
userEditOwner:true,
|
90 |
+
userDelOwner:true,
|
91 |
+
userOwner:43,
|
92 |
+
columnsList:false,
|
93 |
+
rowsList:false,
|
94 |
+
palette:0,
|
95 |
+
paletteDefault:"f00"
|
96 |
+
}
|
97 |
+
if (config.rowsByCategory!="" && !config.dayWithTime)
|
98 |
+
config.dayWithTime = false;
|
99 |
+
config = $jc.extend(def, config);
|
100 |
+
if (!config.userAdd)
|
101 |
+
config.viewNew = false;
|
102 |
+
var tabs = 0;
|
103 |
+
if (config.viewNew && !config.readonly) tabs++;
|
104 |
+
if (config.viewToday) tabs++;
|
105 |
+
if (config.viewDay) tabs++;
|
106 |
+
if (config.viewWeek) tabs++;
|
107 |
+
if (config.viewMonth) tabs++;
|
108 |
+
if (config.viewNDays) tabs++;
|
109 |
+
if (config.viewList) tabs++;
|
110 |
+
if (config.viewNMonth) tabs++;
|
111 |
+
if (config.viewRefresh) tabs++;
|
112 |
+
if (config.viewNavigation && ((tabs==1 && config.viewList) || (tabs==1 && config.viewNMonth) || (tabs==2 && config.viewList && config.viewNMonth))) config.viewNavigation=false;
|
113 |
+
if (config.viewNavigation) tabs++;
|
114 |
+
var string = '<div id="calhead'+config.thecontainer+' "> '+
|
115 |
+
|
116 |
+
((tabs>1)?
|
117 |
+
' <div id="caltoolbar'+config.thecontainer+'" class="ctoolbar">'+
|
118 |
+
((config.viewNew && !config.readonly)?
|
119 |
+
' <div id="faddbtn'+config.thecontainer+'" class="fbutton ui-state-default">'+
|
120 |
+
' <div><span class="ui-icon ui-icon-new"></span><span title="'+i18n.dcmvcal.click_to_create_new_event+'" >'+i18n.dcmvcal.new_event+'</span></div>'+
|
121 |
+
' </div>':'')+
|
122 |
+
((config.viewRefresh)?
|
123 |
+
' <div id="showreflashbtn'+config.thecontainer+'" class="fbutton ui-state-default">'+
|
124 |
+
' <div><span class="ui-icon ui-icon-refresh"></span><span title="'+i18n.dcmvcal.refresh_view+'" class="showdayflash">'+i18n.dcmvcal.refresh+'</span></div>'+
|
125 |
+
' </div>':'')+
|
126 |
+
((config.viewToday)?
|
127 |
+
' <div class="btnseparator"></div>'+
|
128 |
+
' <div id="showtodaybtn'+config.thecontainer+'" class="fbutton ui-state-default">'+
|
129 |
+
' <div><span class="ui-icon ui-icon-today"></span><span title="'+i18n.dcmvcal.click_to_back_to_today+'" class="showtoday">'+i18n.dcmvcal.today+'</span></div>'+
|
130 |
+
' </div>':'')+
|
131 |
+
((config.viewDay)?
|
132 |
+
' <div class="btnseparator"></div>'+
|
133 |
+
' <div id="showdaybtn'+config.thecontainer+'" class="fbutton ui-state-default '+((config.view=="day")?'ui-state-active':'')+'">'+
|
134 |
+
' <div><span title="'+i18n.dcmvcal.sday+'" class="showdayview">'+i18n.dcmvcal.sday+'</span></div>'+
|
135 |
+
' </div>':'')+
|
136 |
+
((config.viewNDays)?
|
137 |
+
' <div id="shownDaysbtn'+config.thecontainer+'" class="fbutton ui-state-default '+((config.view=="nDays")?'ui-state-active':'')+'">'+
|
138 |
+
' <div><span title="'+i18n.dcmvcal.ndays+'" class="shownMonthview">'+i18n.dcmvcal.ndays+'</span></div>'+
|
139 |
+
' </div>':'')+
|
140 |
+
((config.viewWeek)?
|
141 |
+
' <div id="showweekbtn'+config.thecontainer+'" class="fbutton ui-state-default '+((config.view=="week")?'ui-state-active':'')+'">'+
|
142 |
+
' <div><span title="'+i18n.dcmvcal.week+'" class="showweekview">'+i18n.dcmvcal.week+'</span></div>'+
|
143 |
+
' </div>':'')+
|
144 |
+
((config.viewMonth)?
|
145 |
+
' <div id="showmonthbtn'+config.thecontainer+'" class="fbutton ui-state-default '+((config.view=="month")?'ui-state-active':'')+'">'+
|
146 |
+
' <div><span title="'+i18n.dcmvcal.month+'" class="showmonthview">'+i18n.dcmvcal.month+'</span></div>'+
|
147 |
+
' </div>':'')+
|
148 |
+
((config.viewNMonth)?
|
149 |
+
' <div id="shownMonthbtn'+config.thecontainer+'" class="fbutton ui-state-default '+((config.view=="nMonth")?'ui-state-active':'')+'">'+
|
150 |
+
' <div><span title="'+i18n.dcmvcal.nmonth+'" class="shownMonthview">'+i18n.dcmvcal.nmonth+'</span></div>'+
|
151 |
+
' </div>':'')+
|
152 |
+
((config.viewList)?
|
153 |
+
' <div id="shownListbtn'+config.thecontainer+'" class="fbutton ui-state-default '+((config.view=="list")?'ui-state-active':'')+'">'+
|
154 |
+
' <div><span title="'+i18n.dcmvcal.list+'" class="showListview">'+i18n.dcmvcal.list+'</span></div>'+
|
155 |
+
' </div>':'')+
|
156 |
+
((config.viewNavigation)?
|
157 |
+
' <div class="btnseparator"></div>'+
|
158 |
+
' <div id="sfprevbtn'+config.thecontainer+'" title="'+i18n.dcmvcal.prev+'" class="fbutton fprevbtn ">'+
|
159 |
+
' <span class="ui-icon ui-icon-circle-triangle-w"></span>'+
|
160 |
+
' </div>'+
|
161 |
+
' <div id="sfnextbtn'+config.thecontainer+'" title="'+i18n.dcmvcal.next+'" class="fbutton ui-state-default">'+
|
162 |
+
' <span class="ui-icon ui-icon-circle-triangle-e"></span>'+
|
163 |
+
' </div>'+
|
164 |
+
' <div class="fshowdatep">'+
|
165 |
+
' <div>'+
|
166 |
+
' <input type="hidden" name="txtshow" id="hdtxtshow'+config.thecontainer+'" />'+
|
167 |
+
' <span id="txtdatetimeshow'+config.thecontainer+'">'+i18n.dcmvcal.loading+'</span>'+
|
168 |
+
' </div>'+
|
169 |
+
' </div>':'')+
|
170 |
+
((config.print_button)?
|
171 |
+
' <div id="showprintbtn'+config.thecontainer+'" class="fbutton ui-state-default showprintbtn">'+
|
172 |
+
' <div><span title="Print" class="shownprintview">Print</span></div>'+
|
173 |
+
' </div>':'')+
|
174 |
+
((config.export_ical_button)?
|
175 |
+
' <div id="shownICALbtn'+config.thecontainer+'" class="fbutton ui-state-default ">'+
|
176 |
+
' <div><span title="iCal" class="showicalview">iCal</span></div>'+
|
177 |
+
' </div>':'')+
|
178 |
+
' <div style="clear:both"></div></div>':'')+
|
179 |
+
'</div>'+
|
180 |
+
'<div id="editEventContainer"></div>'+
|
181 |
+
'<div>'+
|
182 |
+
' <div id="dvCalMain'+config.thecontainer+'" class="calmain">'+
|
183 |
+
' <div id="loadingpannel'+config.thecontainer+'" class="ptogtitle loadicon" style="display: none;">'+i18n.dcmvcal.loading_data+'</div>'+
|
184 |
+
' <div id="errorpannel'+config.thecontainer+'" class="ptogtitle loaderror" style="display: none;">'+i18n.dcmvcal.sorry_could_not_load_your_data+'</div>'+
|
185 |
+
|
186 |
+
' <div class="gridcontainercover"><div id="gridcontainer'+config.thecontainer+'" style="position:relative;overflow-y: visible;"></div></div>'+
|
187 |
+
' </div>'+
|
188 |
+
'</div>';
|
189 |
+
var $container = $jc("#"+container);
|
190 |
+
if (tabs<=1 && config.viewList)
|
191 |
+
$jc("#"+container).parent().addClass("mvlist");
|
192 |
+
if (tabs<=1 && config.viewNMonth)
|
193 |
+
$jc("#"+container).parent().addClass("mvNMonth");
|
194 |
+
$container.html(string);
|
195 |
+
var DATA_FEED_URL = pathCalendar+"&f=datafeed";
|
196 |
+
var DATA_EDIT_URL = pathCalendar+"&f=edit&month_index="+i18n.dcmvcal.dateformat.month_index+"&delete="+((config.userDel)?"1":"0")+"&palette="+config.palette+"&paletteDefault="+config.paletteDefault+"&calid="+calendarId;
|
197 |
+
var op = {
|
198 |
+
numberOfMonths:config.numberOfMonths,
|
199 |
+
view: config.view,
|
200 |
+
readonly:config.readonly,
|
201 |
+
weekstartday: config.weekstartday,
|
202 |
+
showtooltip:config.showtooltip,
|
203 |
+
tooltipon:config.tooltipon,
|
204 |
+
shownavigate:config.shownavigate,
|
205 |
+
navigateurl:config.navigateurl,
|
206 |
+
target:config.target,
|
207 |
+
showday: new Date(),
|
208 |
+
EditCmdhandler:Edit,
|
209 |
+
DeleteCmdhandler:Delete,
|
210 |
+
ViewCmdhandler:View,
|
211 |
+
onWeekOrMonthToDay:wtd,
|
212 |
+
onBeforeRequestData: cal_beforerequest,
|
213 |
+
onAfterRequestData: cal_afterrequest,
|
214 |
+
onRequestDataError: cal_onerror,
|
215 |
+
autoload:true,
|
216 |
+
url: DATA_FEED_URL + "&method=list&calid="+calendarId,
|
217 |
+
quickAddUrl: DATA_FEED_URL + "&month_index="+i18n.dcmvcal.dateformat.month_index+"&method=add&calid="+calendarId,
|
218 |
+
quickUpdateUrl: DATA_FEED_URL + "&method=update&calid="+calendarId,
|
219 |
+
quickDeleteUrl: DATA_FEED_URL + "&method=remove&calid="+calendarId,
|
220 |
+
dialogWidth:config.dialogWidth,
|
221 |
+
dialogCloseAuto:config.dialogCloseAuto,
|
222 |
+
height:config.height
|
223 |
+
|
224 |
+
};
|
225 |
+
op = $jc.extend(config, op);
|
226 |
+
if (op.startdate && (op.startdate.length>=8) && (op.startdate.length<=10))
|
227 |
+
{
|
228 |
+
var i = op.startdate.split("-");
|
229 |
+
op.startdate = new Date(i[0]*1,i[1]*1-1,i[2]*1);
|
230 |
+
op.showday = op.startdate;
|
231 |
+
}
|
232 |
+
else
|
233 |
+
op.startdate = "";
|
234 |
+
if (op.mindate && (op.mindate.length>=8) && (op.mindate.length<=10))
|
235 |
+
{
|
236 |
+
var i = op.mindate.split("-");
|
237 |
+
op.mindate = new Date(i[0]*1,i[1]*1-1,i[2]*1);
|
238 |
+
}
|
239 |
+
else
|
240 |
+
op.mindate = "";
|
241 |
+
if (op.maxdate && (op.maxdate.length>=8) && (op.maxdate.length<=10))
|
242 |
+
{
|
243 |
+
var i = op.maxdate.split("-");
|
244 |
+
op.maxdate = new Date(i[0]*1,i[1]*1-1,i[2]*1);
|
245 |
+
}
|
246 |
+
else
|
247 |
+
op.maxdate = "";
|
248 |
+
var $dv = $jc("#calhead"+op.thecontainer);
|
249 |
+
var _MH = document.documentElement.clientHeight;
|
250 |
+
var dvH = $dv.height() + 2;
|
251 |
+
//op.height = _MH - dvH;
|
252 |
+
//op.height = "100%";
|
253 |
+
op.eventItems =[];
|
254 |
+
setTimeout("waitvisible('#gridcontainer"+op.thecontainer+"')",100);
|
255 |
+
var p = $jc("#gridcontainer"+op.thecontainer).bcalendar(op).BcalGetOp();
|
256 |
+
if (p && p.datestrshow) {
|
257 |
+
$jc("#txtdatetimeshow"+op.thecontainer).text(p.datestrshow);
|
258 |
+
}
|
259 |
+
$jc("#caltoolbar"+op.thecontainer).noSelect();
|
260 |
+
try {
|
261 |
+
$jc("#hdtxtshow"+op.thecontainer).datepicker({ picker: "#txtdatetimeshow"+op.thecontainer, showtarget: $jc("#txtdatetimeshow"+op.thecontainer),
|
262 |
+
onReturn:function(r){
|
263 |
+
var p = $jc("#gridcontainer"+op.thecontainer).gotoDate(r).BcalGetOp();
|
264 |
+
if (p && p.datestrshow) {
|
265 |
+
$jc("#txtdatetimeshow"+op.thecontainer).text(p.datestrshow);
|
266 |
+
}
|
267 |
+
}
|
268 |
+
});
|
269 |
+
} catch(e){};
|
270 |
+
function cal_beforerequest(type)
|
271 |
+
{
|
272 |
+
var t=i18n.dcmvcal.loading_data;
|
273 |
+
switch(type)
|
274 |
+
{
|
275 |
+
case 1:
|
276 |
+
t=i18n.dcmvcal.loading_data;
|
277 |
+
break;
|
278 |
+
case 2:
|
279 |
+
case 3:
|
280 |
+
case 4:
|
281 |
+
t=i18n.dcmvcal.request_processed;
|
282 |
+
break;
|
283 |
+
}
|
284 |
+
$jc("#errorpannel"+op.thecontainer).hide();
|
285 |
+
$jc("#loadingpannel"+op.thecontainer).html(t);
|
286 |
+
$jc("#loadingpannel"+op.thecontainer).show();
|
287 |
+
}
|
288 |
+
function cal_afterrequest(type)
|
289 |
+
{
|
290 |
+
switch(type)
|
291 |
+
{
|
292 |
+
case 1:
|
293 |
+
$jc("#loadingpannel"+op.thecontainer).hide();
|
294 |
+
break;
|
295 |
+
case 2:
|
296 |
+
case 3:
|
297 |
+
case 4:
|
298 |
+
$jc("#loadingpannel"+op.thecontainer).html(i18n.dcmvcal.success);
|
299 |
+
window.setTimeout(function(){ $jc("#loadingpannel"+op.thecontainer).hide();},2000);
|
300 |
+
break;
|
301 |
+
}
|
302 |
+
|
303 |
+
}
|
304 |
+
function cal_onerror(type,data)
|
305 |
+
{
|
306 |
+
if (type!=2)
|
307 |
+
$jc("#errorpannel"+op.thecontainer).show();
|
308 |
+
if (data.Msg=='OVERLAPPING')
|
309 |
+
alert(i18n.dcmvcal.error_overlapping);
|
310 |
+
//else
|
311 |
+
//alert(data.Msg);
|
312 |
+
}
|
313 |
+
function Edit(data)
|
314 |
+
{
|
315 |
+
var eurl=DATA_EDIT_URL+"&mt="+(config.militaryTime?"true":"false")+"&css="+config.cssStyle+"&lang="+config.language+"&weekstartday="+config.weekstartday+"&hoursStart="+config.hoursStart+"&hoursEnd="+config.hoursEnd+"&id={0}&start={2}&end={3}&isallday={4}&title={1}";
|
316 |
+
if(data)
|
317 |
+
{
|
318 |
+
var url = StrFormat(eurl,data);
|
319 |
+
showEditEvent(url);
|
320 |
+
}
|
321 |
+
}
|
322 |
+
function View(data)
|
323 |
+
{
|
324 |
+
var str = "";
|
325 |
+
$jc.each(data, function(i, item){
|
326 |
+
str += "[" + i + "]: " + item + "\n";
|
327 |
+
});
|
328 |
+
}
|
329 |
+
function Delete(data,callback)
|
330 |
+
{
|
331 |
+
|
332 |
+
$jc.alerts.okButton=i18n.dcmvcal.ok;
|
333 |
+
$jc.alerts.cancelButton=i18n.dcmvcal.cancel;
|
334 |
+
hiConfirm(i18n.dcmvcal.are_you_sure_delete, 'Confirm',function(r){ r && callback(0,data[0]);});
|
335 |
+
}
|
336 |
+
function wtd(p)
|
337 |
+
{
|
338 |
+
if (p && p.datestrshow) {
|
339 |
+
$jc("#txtdatetimeshow"+op.thecontainer).text(p.datestrshow);
|
340 |
+
}
|
341 |
+
$jc("#caltoolbar"+op.thecontainer+" div.ui-state-active").each(function() {
|
342 |
+
$jc(this).removeClass("ui-state-active");
|
343 |
+
})
|
344 |
+
$jc("#showdaybtn"+op.thecontainer).addClass("ui-state-active");
|
345 |
+
}
|
346 |
+
//to show day view
|
347 |
+
try {
|
348 |
+
$jc("#showdaybtn"+op.thecontainer).click(function(e) {
|
349 |
+
$jc("#caltoolbar"+op.thecontainer+" div.ui-state-active").each(function() {
|
350 |
+
$jc(this).removeClass("ui-state-active");
|
351 |
+
})
|
352 |
+
$jc(this).addClass("ui-state-active");
|
353 |
+
var p = $jc("#gridcontainer"+op.thecontainer).swtichView("day").BcalGetOp();
|
354 |
+
if (p && p.datestrshow) {
|
355 |
+
$jc("#txtdatetimeshow"+op.thecontainer).text(p.datestrshow);
|
356 |
+
}
|
357 |
+
});
|
358 |
+
} catch(e){};
|
359 |
+
//to show week view
|
360 |
+
try {
|
361 |
+
$jc("#showweekbtn"+op.thecontainer).click(function(e) {
|
362 |
+
$jc("#caltoolbar"+op.thecontainer+" div.ui-state-active").each(function() {
|
363 |
+
$jc(this).removeClass("ui-state-active");
|
364 |
+
})
|
365 |
+
$jc(this).addClass("ui-state-active");
|
366 |
+
var p = $jc("#gridcontainer"+op.thecontainer).swtichView("week").BcalGetOp();
|
367 |
+
if (p && p.datestrshow) {
|
368 |
+
$jc("#txtdatetimeshow"+op.thecontainer).text(p.datestrshow);
|
369 |
+
}
|
370 |
+
|
371 |
+
});
|
372 |
+
} catch(e){};
|
373 |
+
//to show month view
|
374 |
+
try {
|
375 |
+
$jc("#showmonthbtn"+op.thecontainer).click(function(e) {
|
376 |
+
$jc("#caltoolbar"+op.thecontainer+" div.ui-state-active").each(function() {
|
377 |
+
$jc(this).removeClass("ui-state-active");
|
378 |
+
})
|
379 |
+
$jc(this).addClass("ui-state-active");
|
380 |
+
var p = $jc("#gridcontainer"+op.thecontainer).swtichView("month").BcalGetOp();
|
381 |
+
if (p && p.datestrshow) {
|
382 |
+
$jc("#txtdatetimeshow"+op.thecontainer).text(p.datestrshow);
|
383 |
+
}
|
384 |
+
});
|
385 |
+
} catch(e){};
|
386 |
+
//to show nDays view
|
387 |
+
try {
|
388 |
+
$jc("#shownDaysbtn"+op.thecontainer).click(function(e) {
|
389 |
+
$jc("#caltoolbar"+op.thecontainer+" div.ui-state-active").each(function() {
|
390 |
+
$jc(this).removeClass("ui-state-active");
|
391 |
+
})
|
392 |
+
$jc(this).addClass("ui-state-active");
|
393 |
+
var p = $jc("#gridcontainer"+op.thecontainer).swtichView("nDays").BcalGetOp();
|
394 |
+
if (p && p.datestrshow) {
|
395 |
+
$jc("#txtdatetimeshow"+op.thecontainer).text(p.datestrshow);
|
396 |
+
}
|
397 |
+
});
|
398 |
+
} catch(e){};
|
399 |
+
//to show List view
|
400 |
+
try {
|
401 |
+
$jc("#shownListbtn"+op.thecontainer).click(function(e) {
|
402 |
+
$jc("#caltoolbar"+op.thecontainer+" div.ui-state-active").each(function() {
|
403 |
+
$jc(this).removeClass("ui-state-active");
|
404 |
+
})
|
405 |
+
$jc(this).addClass("ui-state-active");
|
406 |
+
var p = $jc("#gridcontainer"+op.thecontainer).swtichView("list").BcalGetOp();
|
407 |
+
|
408 |
+
if (p && p.datestrshow) {
|
409 |
+
$jc("#txtdatetimeshow"+op.thecontainer).text(p.datestrshow);
|
410 |
+
}
|
411 |
+
});
|
412 |
+
} catch(e){};
|
413 |
+
//to show nMonth view
|
414 |
+
try {
|
415 |
+
$jc("#shownMonthbtn"+op.thecontainer).click(function(e) {
|
416 |
+
$jc("#caltoolbar"+op.thecontainer+" div.ui-state-active").each(function() {
|
417 |
+
$jc(this).removeClass("ui-state-active");
|
418 |
+
})
|
419 |
+
$jc(this).addClass("ui-state-active");
|
420 |
+
var p = $jc("#gridcontainer"+op.thecontainer).swtichView("nMonth").BcalGetOp();
|
421 |
+
if (p && p.datestrshow) {
|
422 |
+
$jc("#txtdatetimeshow"+op.thecontainer).text(p.datestrshow);
|
423 |
+
}
|
424 |
+
});
|
425 |
+
} catch(e){};
|
426 |
+
try {
|
427 |
+
$jc("#showreflashbtn"+op.thecontainer).click(function(e){
|
428 |
+
$jc("#gridcontainer"+op.thecontainer).reload();
|
429 |
+
});
|
430 |
+
} catch(e){};
|
431 |
+
try {
|
432 |
+
$jc("#shownICALbtn"+op.thecontainer).click(function(e){
|
433 |
+
window.location = DATA_FEED_URL.replace("datafeed","ical")+"&id="+calendarId;
|
434 |
+
});
|
435 |
+
} catch(e){};
|
436 |
+
try {
|
437 |
+
$jc("#showprintbtn"+op.thecontainer).click(function(e){
|
438 |
+
w=window.open();
|
439 |
+
var code = $jc("#"+op.thecontainer).parent().html()+"";
|
440 |
+
if ($jc("#gridcontainer"+op.thecontainer).BcalGetOp().view=="nMonth")
|
441 |
+
code = code.replace(/width:/g,"width-");
|
442 |
+
w.document.write('<html><head><style>#multicalendar .ctoolbar{height:22px}#multicalendar .fbutton{display:none}</style><link rel="stylesheet" href="'+config.mvcsspath+config.cssStyle+'/calendar.css" type="text/css" media="print,screen"/><link rel="stylesheet" href="'+config.mvcsspath+'main.css" type="text/css" media="print,screen"/></head><body><div id="multicalendar">'+code+'</div></body></html>');
|
443 |
+
w.document.close();
|
444 |
+
w.print();
|
445 |
+
w.close();
|
446 |
+
});
|
447 |
+
} catch(e){};
|
448 |
+
function showEditEvent(url)
|
449 |
+
{
|
450 |
+
var width = 600;
|
451 |
+
var height = 480;
|
452 |
+
try {
|
453 |
+
$jc("#editEvent").remove();
|
454 |
+
var content = '<iframe id="dailog_iframe_1305934814858" frameborder="0" style="border:none;width:550px;height:'+(height-50)+'px" src="'+url+'" border="0" scrolling="no">';
|
455 |
+
$jc("#editEventContainer").append("<div id=\"editEvent\" >"+content+"</div>");
|
456 |
+
$jc("#editEvent").dialog({
|
457 |
+
width: width,
|
458 |
+
height: height,
|
459 |
+
modal: true,resizable: false,maxWidth: width,
|
460 |
+
fluid: true,
|
461 |
+
open: function(event, ui){fluidDialog();},
|
462 |
+
//position: 'center',
|
463 |
+
position: {
|
464 |
+
my: "left top",
|
465 |
+
at: "left top",
|
466 |
+
collision:"fit flip",
|
467 |
+
of: $jc("#gridcontainer"+op.thecontainer)
|
468 |
+
},
|
469 |
+
title:i18n.dcmvcal.manage_the_calendar
|
470 |
+
,close: function(event, ui) {$jc("#editEvent").remove();$jc("#gridcontainer"+op.thecontainer).reload(); }
|
471 |
+
}).parent().addClass("mv_dlg").addClass("mv_dlg_editevent");
|
472 |
+
$jc(".ui-widget-overlay").css("position","absolute");
|
473 |
+
$jc(".ui-widget-overlay").css("top","0");
|
474 |
+
$jc(".ui-widget-overlay").css("left","0");
|
475 |
+
$jc(".ui-widget-overlay").css("background","#aaaaaa");
|
476 |
+
$jc(".ui-widget-overlay").css("opacity","0.3");
|
477 |
+
} catch(e){};
|
478 |
+
}
|
479 |
+
//Add a new event
|
480 |
+
try {
|
481 |
+
$jc("#faddbtn"+op.thecontainer).click(function(e) {
|
482 |
+
var url =DATA_EDIT_URL+"&r="+Math.random()+"&css="+config.cssStyle+"&lang="+config.language+"&weekstartday="+config.weekstartday+"&hoursStart="+config.hoursStart+"&hoursEnd="+config.hoursEnd;
|
483 |
+
showEditEvent(url);
|
484 |
+
|
485 |
+
|
486 |
+
});
|
487 |
+
} catch(e){};
|
488 |
+
//go to today
|
489 |
+
try {
|
490 |
+
$jc("#showtodaybtn"+op.thecontainer).click(function(e) {
|
491 |
+
var p = $jc("#gridcontainer"+op.thecontainer).gotoDate().BcalGetOp();
|
492 |
+
if (p && p.datestrshow) {
|
493 |
+
$jc("#txtdatetimeshow"+op.thecontainer).text(p.datestrshow);
|
494 |
+
}
|
495 |
+
|
496 |
+
|
497 |
+
});
|
498 |
+
} catch(e){};
|
499 |
+
//previous date range
|
500 |
+
try {
|
501 |
+
$jc("#sfprevbtn"+op.thecontainer).click(function(e) {
|
502 |
+
if (!$jc("#sfprevbtn"+op.thecontainer).hasClass("non-navigate"))
|
503 |
+
{
|
504 |
+
|
505 |
+
var p = $jc("#gridcontainer"+op.thecontainer).previousRange().BcalGetOp();
|
506 |
+
if (p && p.datestrshow) {
|
507 |
+
$jc("#txtdatetimeshow"+op.thecontainer).text(p.datestrshow);
|
508 |
+
}
|
509 |
+
}
|
510 |
+
});
|
511 |
+
} catch(e){};
|
512 |
+
//next date range
|
513 |
+
try {
|
514 |
+
$jc("#sfnextbtn"+op.thecontainer).click(function(e) {
|
515 |
+
if (!$jc("#sfnextbtn"+op.thecontainer).hasClass("non-navigate"))
|
516 |
+
{
|
517 |
+
var p = $jc("#gridcontainer"+op.thecontainer).nextRange().BcalGetOp();
|
518 |
+
if (p && p.datestrshow) {
|
519 |
+
$jc("#txtdatetimeshow"+op.thecontainer).text(p.datestrshow);
|
520 |
+
}
|
521 |
+
}
|
522 |
+
});
|
523 |
+
} catch(e){};
|
524 |
+
|
525 |
+
|
526 |
+
|
527 |
+
|
528 |
+
|
529 |
+
|
530 |
+
|
531 |
+
|
532 |
+
|
533 |
+
})($jc);
|
534 |
+
|
535 |
+
});
|
536 |
+
}
|
DC_MultiViewCal/src/Plugins/multiview.public.js
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
try {
|
2 |
+
for (var i=0; i<100;i++)
|
3 |
+
{
|
4 |
+
try {
|
5 |
+
var tt = eval("cpmvc_configmultiview"+i);
|
6 |
+
if (tt)
|
7 |
+
{
|
8 |
+
(function($) {
|
9 |
+
mvcconfig = $.parseJSON(tt.obj);
|
10 |
+
if (mvcconfig.params.otherparams)
|
11 |
+
{
|
12 |
+
//console.log("var others={"+mvcconfig.params.otherparams+"};");
|
13 |
+
mvcconfig.params.otherparams = mvcconfig.params.otherparams.replace(/#/g,'"');
|
14 |
+
eval("var others={"+mvcconfig.params.otherparams+"};");
|
15 |
+
mvcconfig.params = $.extend(mvcconfig.params, others);
|
16 |
+
}
|
17 |
+
})(jQuery);
|
18 |
+
var pathCalendar = mvcconfig.ajax_url;
|
19 |
+
if ( document.getElementById("cal"+mvcconfig.calendar+"_"+i) !== null)
|
20 |
+
initMultiViewCal("cal"+mvcconfig.calendar+"_"+i, mvcconfig.calendar,(mvcconfig.params));
|
21 |
+
}
|
22 |
+
}catch (e) {}
|
23 |
+
}
|
24 |
+
}catch (e) {}
|
DC_MultiViewCal/src/Plugins/repeat.js
ADDED
@@ -0,0 +1,466 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
function fluidDialog() {
|
2 |
+
var $visible = $(".ui-dialog:visible");
|
3 |
+
// each open dialog
|
4 |
+
$visible.each(function () {
|
5 |
+
var $this = $(this);
|
6 |
+
var dialog = $this.find(".ui-dialog-content");
|
7 |
+
if (dialog.dialog("option","fluid")) {
|
8 |
+
var wWidth = $(window).width();
|
9 |
+
// check window width against dialog width
|
10 |
+
if (wWidth < (parseInt(dialog.dialog("option","maxWidth")) + 50)) {
|
11 |
+
// keep dialog from filling entire screen
|
12 |
+
$this.css("max-width", "90%");
|
13 |
+
} else {
|
14 |
+
// fix maxWidth bug
|
15 |
+
$this.css("max-width", dialog.dialog("option","maxWidth") + "px");
|
16 |
+
}
|
17 |
+
//reposition dialog
|
18 |
+
dialog.dialog("option","position", dialog.dialog("option","position"));
|
19 |
+
}
|
20 |
+
});
|
21 |
+
|
22 |
+
}
|
23 |
+
$(window).resize(function () {
|
24 |
+
fluidDialog();
|
25 |
+
});
|
26 |
+
$(document).on("dialogopen", ".ui-dialog", function (event, ui) {
|
27 |
+
fluidDialog();
|
28 |
+
});
|
29 |
+
$(function() {
|
30 |
+
var weekDays = new Array("SU","MO","TU","WE","TH","FR","SA");
|
31 |
+
var weekDaysLarge = new Array(i18n.dcmvcal.dateformat.sunday, i18n.dcmvcal.dateformat.monday, i18n.dcmvcal.dateformat.tuesday, i18n.dcmvcal.dateformat.wednesday, i18n.dcmvcal.dateformat.thursday, i18n.dcmvcal.dateformat.friday, i18n.dcmvcal.dateformat.saturday);
|
32 |
+
var monthsName = new Array(i18n.dcmvcal.dateformat.jan, i18n.dcmvcal.dateformat.feb, i18n.dcmvcal.dateformat.mar, i18n.dcmvcal.dateformat.apr, i18n.dcmvcal.dateformat.may, i18n.dcmvcal.dateformat.jun, i18n.dcmvcal.dateformat.jul, i18n.dcmvcal.dateformat.aug, i18n.dcmvcal.dateformat.sep, i18n.dcmvcal.dateformat.oct, i18n.dcmvcal.dateformat.nov, i18n.dcmvcal.dateformat.dec);
|
33 |
+
var prefixes = new Array(i18n.dcmvcal.first, i18n.dcmvcal.second, i18n.dcmvcal.third, i18n.dcmvcal.fourth, i18n.dcmvcal.last);
|
34 |
+
|
35 |
+
openRepeatWin = function(){
|
36 |
+
loadRepeatData($("#rrule").val());
|
37 |
+
$("#repeat").dialog({modal: true,resizable: false,maxWidth: 420,fluid: true,open: function(event, ui){fluidDialog();},width:420}).parent().addClass("mv_dlg").addClass("mv_dlg_editevent").addClass("infocontainer") ;
|
38 |
+
$(".mv_dlg").css("height","0px");
|
39 |
+
}
|
40 |
+
$("#savebtnRepeat,#closebtnRepeat").button();
|
41 |
+
$("#savebtnRepeat" ).button( "option", "label", i18n.dcmvcal.i_save );
|
42 |
+
$("#closebtnRepeat" ).button( "option", "label", i18n.dcmvcal.i_close );
|
43 |
+
|
44 |
+
|
45 |
+
$("#rsh2").html(i18n.dcmvcal.edit_recurring_event);
|
46 |
+
$("#rsp1").html(i18n.dcmvcal.would_you_like_to_change_only_this_event_all_events_in_the_series_or_this_and_all_following_events_in_the_series);
|
47 |
+
$("#r_save_one").html(i18n.dcmvcal.only_this_event);
|
48 |
+
$("#rss1").html(i18n.dcmvcal.all_other_events_in_the_series_will_remain_the_same);
|
49 |
+
$("#r_save_following").html(i18n.dcmvcal.following_events);
|
50 |
+
$("#rss2").html(i18n.dcmvcal.this_and_all_the_following_events_will_be_changed);
|
51 |
+
$("#rss3").html(i18n.dcmvcal.any_changes_to_future_events_will_be_lost);
|
52 |
+
$("#r_save_all").html(i18n.dcmvcal.all_events);
|
53 |
+
$("#rss4").html(i18n.dcmvcal.all_events_in_the_series_will_be_changed);
|
54 |
+
$("#rss5").html(i18n.dcmvcal.any_changes_made_to_other_events_will_be_kept);
|
55 |
+
$("#r_save_cancel").html(i18n.dcmvcal.cancel_this_change);
|
56 |
+
$("#rdh2").html(i18n.dcmvcal.delete_recurring_event);
|
57 |
+
$("#rdp1").html(i18n.dcmvcal.would_you_like_to_delete_only_this_event_all_events_in_the_series_or_this_and_all_future_events_in_the_series);
|
58 |
+
$("#r_delete_one").html(i18n.dcmvcal.only_this_instance);
|
59 |
+
$("#rds1").html(i18n.dcmvcal.all_other_events_in_the_series_will_remain);
|
60 |
+
$("#r_delete_following").html(i18n.dcmvcal.all_following);
|
61 |
+
$("#rds2").html(i18n.dcmvcal.this_and_all_the_following_events_will_be_deleted);
|
62 |
+
$("#r_delete_all").html(i18n.dcmvcal.all_events_in_the_series);
|
63 |
+
$("#rds3").html(i18n.dcmvcal.all_events_in_the_series_will_be_deleted);
|
64 |
+
$("#r_delete_cancel").html(i18n.dcmvcal.cancel_this_change);
|
65 |
+
|
66 |
+
$("#rl1").html(i18n.dcmvcal.repeats);
|
67 |
+
$("#opt0").html(i18n.dcmvcal.daily);
|
68 |
+
$("#opt1").html(i18n.dcmvcal.every_weekday_monday_to_friday);
|
69 |
+
$("#opt2").html(i18n.dcmvcal.every_monday_wednesday_and_friday);
|
70 |
+
$("#opt3").html(i18n.dcmvcal.every_tuesday_and_thursday);
|
71 |
+
$("#opt4").html(i18n.dcmvcal.weekly);
|
72 |
+
$("#opt5").html(i18n.dcmvcal.monthly);
|
73 |
+
$("#opt6").html(i18n.dcmvcal.yearly);
|
74 |
+
$("#rl2").html(i18n.dcmvcal.repeat_every);
|
75 |
+
$("#interval_label").html(i18n.dcmvcal.weeks);
|
76 |
+
$("#rl3").html(i18n.dcmvcal.repeat_on);
|
77 |
+
$("#chk0").html(i18n.dcmvcal.dateformat.sun2.toUpperCase());
|
78 |
+
$("#chk1").html(i18n.dcmvcal.dateformat.mon2.toUpperCase());
|
79 |
+
$("#chk2").html(i18n.dcmvcal.dateformat.tue2.toUpperCase());
|
80 |
+
$("#chk3").html(i18n.dcmvcal.dateformat.wed2.toUpperCase());
|
81 |
+
$("#chk4").html(i18n.dcmvcal.dateformat.thu2.toUpperCase());
|
82 |
+
$("#chk5").html(i18n.dcmvcal.dateformat.fri2.toUpperCase());
|
83 |
+
$("#chk6").html(i18n.dcmvcal.dateformat.sat2.toUpperCase());
|
84 |
+
$("#rl4").html(i18n.dcmvcal.repeat_by);
|
85 |
+
$("#bydaymonth1").html(i18n.dcmvcal.day_of_the_month);
|
86 |
+
$("#bydaymonth2").html(i18n.dcmvcal.day_of_the_week);
|
87 |
+
$("#rl5").html(i18n.dcmvcal.starts_on);
|
88 |
+
$("#rl6").html(i18n.dcmvcal.ends);
|
89 |
+
$("#end1").html(i18n.dcmvcal.never);
|
90 |
+
$("#end21").html(i18n.dcmvcal.after);
|
91 |
+
$("#end22").html(i18n.dcmvcal.occurrences);
|
92 |
+
$("#end3").html(i18n.dcmvcal.on);
|
93 |
+
$("#rl7").html(i18n.dcmvcal.summary);
|
94 |
+
|
95 |
+
|
96 |
+
|
97 |
+
$("#closebtnRepeat").click(function() {
|
98 |
+
if ($("#rrule").val()=="")
|
99 |
+
{
|
100 |
+
$("#format").html("");
|
101 |
+
$("#repeatspan").html("");
|
102 |
+
$("#repeatcheckbox").attr("checked","");
|
103 |
+
}
|
104 |
+
$("#repeat").dialog('close');
|
105 |
+
});
|
106 |
+
$("#savebtnRepeat").click(function() {
|
107 |
+
$("#rrule").val($("#format").val());
|
108 |
+
if ($("#format").val()=="")
|
109 |
+
{
|
110 |
+
$("#repeatspan").html("");
|
111 |
+
$("#repeatcheckbox").attr("checked","");
|
112 |
+
}
|
113 |
+
else
|
114 |
+
{
|
115 |
+
//$("#repeatspan").html(summary);
|
116 |
+
$("#repeatcheckbox").attr("checked","checked");
|
117 |
+
}
|
118 |
+
$("#repeat").dialog('close');
|
119 |
+
});
|
120 |
+
if (!DateAdd || typeof (DateDiff) != "function") {
|
121 |
+
var DateAdd = function(interval, number, idate) {
|
122 |
+
number = parseInt(number);
|
123 |
+
var date;
|
124 |
+
if (typeof (idate) == "string") {
|
125 |
+
date = idate.split(/\D/);
|
126 |
+
eval("var date = new Date(" + date.join(",") + ")");
|
127 |
+
}
|
128 |
+
|
129 |
+
if (typeof (idate) == "object") {
|
130 |
+
date = new Date(idate.toString());
|
131 |
+
}
|
132 |
+
switch (interval) {
|
133 |
+
case "y": date.setFullYear(date.getFullYear() + number); break;
|
134 |
+
case "m": date.setMonth(date.getMonth() + number); break;
|
135 |
+
case "d": date.setDate(date.getDate() + number); break;
|
136 |
+
case "w": date.setDate(date.getDate() + 7 * number); break;
|
137 |
+
case "h": date.setHours(date.getHours() + number); break;
|
138 |
+
case "n": date.setMinutes(date.getMinutes() + number); break;
|
139 |
+
case "s": date.setSeconds(date.getSeconds() + number); break;
|
140 |
+
case "l": date.setMilliseconds(date.getMilliseconds() + number); break;
|
141 |
+
}
|
142 |
+
return date;
|
143 |
+
}
|
144 |
+
}
|
145 |
+
function weekAndDay(date) {
|
146 |
+
return (0 | (date.getDate()-1) / 7);
|
147 |
+
}
|
148 |
+
timeToUntilString= function(time) {
|
149 |
+
var date = new Date(time);
|
150 |
+
var comp, comps = [
|
151 |
+
date.getUTCFullYear(),
|
152 |
+
date.getUTCMonth() + 1,
|
153 |
+
date.getUTCDate(),
|
154 |
+
'T',
|
155 |
+
date.getUTCHours(),
|
156 |
+
date.getUTCMinutes(),
|
157 |
+
date.getUTCSeconds(),
|
158 |
+
'Z'
|
159 |
+
];
|
160 |
+
for (var i = 0; i < comps.length; i++) {
|
161 |
+
comp = comps[i];
|
162 |
+
if (!/[TZ]/.test(comp) && comp < 10) {
|
163 |
+
comps[i] = '0' + String(comp);
|
164 |
+
}
|
165 |
+
}
|
166 |
+
return comps.join('');
|
167 |
+
}
|
168 |
+
loadRepeatData = function(data)
|
169 |
+
{
|
170 |
+
for (var i=1;i<=30;i++)
|
171 |
+
$("#interval").append('<option value="'+i+'">'+i+'</option>');
|
172 |
+
for (var i=1;i<100;i++)
|
173 |
+
$("#end_after").append('<option value="'+i+'">'+i+'</option>');
|
174 |
+
$("#end_after").val(10);
|
175 |
+
var d = $("#starts").html().split("/");
|
176 |
+
var arrs = $("#starts").html().split(i18n.dcmvcal.dateformat.separator);
|
177 |
+
var year = arrs[i18n.dcmvcal.dateformat.year_index];
|
178 |
+
var month = arrs[i18n.dcmvcal.dateformat.month_index];
|
179 |
+
var day = arrs[i18n.dcmvcal.dateformat.day_index];
|
180 |
+
$("#stpartdatelast").val([month,day,year].join("/"));
|
181 |
+
var currentDate = new Date(year, month-1, day);
|
182 |
+
$("#end_until_input").val(d[0]+"/"+d[1]+"/"+(parseInt(d[2])+1))
|
183 |
+
if (data == "")
|
184 |
+
data = "FREQ=WEEKLY;BYDAY="+weekDays[currentDate.getDay()]+"";
|
185 |
+
var v_freq = 4;
|
186 |
+
var d = data.split(";");
|
187 |
+
for (var i=0;i<d.length;i++)
|
188 |
+
{
|
189 |
+
var dd = d[i].split("=");
|
190 |
+
d[i] = {k:dd[0],v:dd[1]};
|
191 |
+
}
|
192 |
+
for (var i=0;i<d.length;i++)
|
193 |
+
{
|
194 |
+
switch(d[i].k)
|
195 |
+
{
|
196 |
+
case "FREQ":
|
197 |
+
switch(d[i].v)
|
198 |
+
{
|
199 |
+
case "DAILY":
|
200 |
+
v_freq = 0;
|
201 |
+
break;
|
202 |
+
case "WEEKLY":
|
203 |
+
v_freq = 4;
|
204 |
+
break;
|
205 |
+
case "MONTHLY":
|
206 |
+
v_freq = 5;
|
207 |
+
break;
|
208 |
+
case "YEARLY":
|
209 |
+
v_freq = 6;
|
210 |
+
break;
|
211 |
+
}
|
212 |
+
break;
|
213 |
+
case "INTERVAL":
|
214 |
+
$("#interval").val(d[i].v);
|
215 |
+
break;
|
216 |
+
case "BYDAY":
|
217 |
+
|
218 |
+
var dd = d[i].v.split(",");
|
219 |
+
|
220 |
+
var sample1 = ["MO","TU","WE","TH","FR"]; //Every weekday (Monday to Friday) // ["MO","TU","WE","TH","FR"];
|
221 |
+
if ($(dd).not(sample1).length == 0 && $(sample1).not(dd).length == 0)
|
222 |
+
v_freq = 1;
|
223 |
+
|
224 |
+
var sample2 = ["MO","WE","FR"]; //Every Monday, Wednesday, and Friday // ["MO","WE","FR"];
|
225 |
+
if ($(dd).not(sample2).length == 0 && $(sample2).not(dd).length == 0)
|
226 |
+
v_freq = 2;
|
227 |
+
|
228 |
+
var sample3 = ["TU","TH"]; //Every Tuesday, and Thursday // ["TU","TH"];
|
229 |
+
if ($(dd).not(sample3).length == 0 && $(sample3).not(dd).length == 0)
|
230 |
+
v_freq = 3;
|
231 |
+
for (j = 0; j < dd.length; j++) {
|
232 |
+
day = dd[j];
|
233 |
+
if (day.length == 2) { // MO, TU, ... instanceof Weekday
|
234 |
+
$("#byday"+dd[j]).attr("checked","checked");
|
235 |
+
} else { // -1MO, +3FR, 1SO, ... instanceof MONTHLY, YEARLY
|
236 |
+
day = day.match(/^([+-]?\d)([A-Z]{2})$/);
|
237 |
+
n = Number(day[1]);
|
238 |
+
wday = day[2];
|
239 |
+
$("#byday_w").attr("checked","checked");
|
240 |
+
}
|
241 |
+
}
|
242 |
+
for (var j=0;j<dd.length;j++)
|
243 |
+
$("#byday"+dd[j]).attr("checked","checked");
|
244 |
+
break;
|
245 |
+
case "COUNT":
|
246 |
+
$("#end_count").attr("checked","checked");
|
247 |
+
$("#end_after").val(d[i].v);
|
248 |
+
break;
|
249 |
+
case "UNTIL":
|
250 |
+
var day = /(\d{4})(\d{2})(\d{2})T(\d{2})(\d{2})(\d{2})Z/.exec(d[i].v);
|
251 |
+
var until = new Date(Date.UTC(day[1], day[2] - 1,day[3], day[4], day[5], day[6]));
|
252 |
+
$("#end_until").attr("checked","checked");
|
253 |
+
$("#end_until_input").val((until.getMonth()+1)+"/"+until.getDate()+"/"+until.getFullYear());
|
254 |
+
break;
|
255 |
+
case "BYMONTHDAY":
|
256 |
+
case "BYMONTH":
|
257 |
+
$("#byday_m").attr("checked","checked");
|
258 |
+
break;
|
259 |
+
|
260 |
+
|
261 |
+
|
262 |
+
}
|
263 |
+
}
|
264 |
+
summaryDisplay = function()
|
265 |
+
{
|
266 |
+
var v = parseInt($("#freq").val());
|
267 |
+
var summary = "";
|
268 |
+
var format = "";
|
269 |
+
switch(v)
|
270 |
+
{
|
271 |
+
case 0:
|
272 |
+
format += "FREQ=DAILY";
|
273 |
+
if ($("#interval").val()==1)
|
274 |
+
summary += i18n.dcmvcal.daily;
|
275 |
+
else
|
276 |
+
{
|
277 |
+
summary += i18n.dcmvcal.every+" "+$("#interval").val()+" "+i18n.dcmvcal.day_plural;
|
278 |
+
format += ";INTERVAL="+$("#interval").val();
|
279 |
+
}
|
280 |
+
|
281 |
+
break;
|
282 |
+
case 1:
|
283 |
+
format += "FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR";
|
284 |
+
summary += i18n.dcmvcal.weekly_on_weekdays;
|
285 |
+
break;
|
286 |
+
case 2:
|
287 |
+
format += "FREQ=WEEKLY;BYDAY=MO,WE,FR";
|
288 |
+
summary += i18n.dcmvcal.weekly_on_monday_wednesday_friday;
|
289 |
+
break;
|
290 |
+
case 3:
|
291 |
+
format += "FREQ=WEEKLY;BYDAY=TU,TH";
|
292 |
+
summary += i18n.dcmvcal.weekly_on_tuesday_thursday;
|
293 |
+
break;
|
294 |
+
case 4:
|
295 |
+
format += "FREQ=WEEKLY";
|
296 |
+
for (var i=0;i<weekDays.length;i++)
|
297 |
+
{
|
298 |
+
if ($("#byday"+weekDays[i]).is(":checked"))
|
299 |
+
{
|
300 |
+
if (summary =="")
|
301 |
+
{
|
302 |
+
summary += " "+i18n.dcmvcal.on+" ";
|
303 |
+
format += ";BYDAY=";
|
304 |
+
}
|
305 |
+
else
|
306 |
+
{
|
307 |
+
summary += ", ";
|
308 |
+
format += ",";
|
309 |
+
}
|
310 |
+
summary += weekDaysLarge[i];
|
311 |
+
format += weekDays[i];
|
312 |
+
}
|
313 |
+
}
|
314 |
+
if ($("#interval").val()==1)
|
315 |
+
summary = i18n.dcmvcal.weekly+summary;
|
316 |
+
else
|
317 |
+
{
|
318 |
+
summary = i18n.dcmvcal.every+" "+$("#interval").val()+" "+i18n.dcmvcal.weeks+summary;
|
319 |
+
format += ";INTERVAL="+$("#interval").val();
|
320 |
+
}
|
321 |
+
break;
|
322 |
+
case 5:
|
323 |
+
format += "FREQ=MONTHLY";
|
324 |
+
if ($("#byday_m").is(":checked"))
|
325 |
+
{
|
326 |
+
summary += " "+i18n.dcmvcal.on_day+" "+currentDate.getDate();
|
327 |
+
format += ";BYMONTHDAY="+currentDate.getDate();
|
328 |
+
}
|
329 |
+
else
|
330 |
+
{
|
331 |
+
summary += " "+i18n.dcmvcal.on_the+" "+prefixes[weekAndDay(currentDate)]+ " " +weekDaysLarge[currentDate.getDay()];
|
332 |
+
format += ";BYDAY="+(weekAndDay(currentDate)==4?-1:(weekAndDay(currentDate)+1))+weekDays[currentDate.getDay()];
|
333 |
+
}
|
334 |
+
if ($("#interval").val()==1)
|
335 |
+
summary = i18n.dcmvcal.monthly+summary;
|
336 |
+
else
|
337 |
+
{
|
338 |
+
summary = i18n.dcmvcal.every+" "+$("#interval").val()+" "+i18n.dcmvcal.months+summary;
|
339 |
+
format += ";INTERVAL="+$("#interval").val();
|
340 |
+
}
|
341 |
+
break;
|
342 |
+
case 6:
|
343 |
+
format += "FREQ=YEARLY;BYMONTH="+(currentDate.getMonth()+1);
|
344 |
+
if ($("#byday_m").is(":checked"))
|
345 |
+
{
|
346 |
+
summary += " "+i18n.dcmvcal.on+" " + monthsName[currentDate.getMonth()] + " " + currentDate.getDate();
|
347 |
+
}
|
348 |
+
else
|
349 |
+
{
|
350 |
+
summary += " "+i18n.dcmvcal.on+" " + monthsName[currentDate.getMonth()] + ", "+prefixes[weekAndDay(currentDate)]+ " " +weekDaysLarge[currentDate.getDay()];
|
351 |
+
format += ";BYDAY="+(weekAndDay(currentDate)+1)+weekDays[currentDate.getDay()];
|
352 |
+
}
|
353 |
+
if ($("#interval").val()==1)
|
354 |
+
summary = i18n.dcmvcal.annually+summary;
|
355 |
+
else
|
356 |
+
{
|
357 |
+
summary = i18n.dcmvcal.every+" "+$("#interval").val()+" "+i18n.dcmvcal.years+summary;
|
358 |
+
format += ";INTERVAL="+$("#interval").val();
|
359 |
+
}
|
360 |
+
break;
|
361 |
+
}
|
362 |
+
if ($("#end_count").is(":checked"))
|
363 |
+
{
|
364 |
+
if (parseInt($("#end_after").val())==1)
|
365 |
+
summary = i18n.dcmvcal.once;
|
366 |
+
else
|
367 |
+
{
|
368 |
+
summary += ", "+$("#end_after").val()+" "+i18n.dcmvcal.times;
|
369 |
+
format += ";COUNT="+$("#end_after").val();
|
370 |
+
}
|
371 |
+
}
|
372 |
+
else if ($("#end_until").is(":checked"))
|
373 |
+
{
|
374 |
+
if ($("#end_until_input").val()!="")
|
375 |
+
{
|
376 |
+
var d = $("#end_until_input").val().split("/");
|
377 |
+
var endDate = new Date(d[2], d[0]-1, d[1]);
|
378 |
+
summary += ", "+i18n.dcmvcal.until+" " + monthsName[d[0]-1] + " " + d[1] + ", " + d[2];
|
379 |
+
format += ";UNTIL="+timeToUntilString(endDate);
|
380 |
+
}
|
381 |
+
}
|
382 |
+
$("#summary").html(summary);
|
383 |
+
$("#format").val(format);
|
384 |
+
if ($("#format").val()=="")
|
385 |
+
{
|
386 |
+
$("#repeatspan").html("");
|
387 |
+
$("#repeatcheckbox").attr("checked","");
|
388 |
+
}
|
389 |
+
else
|
390 |
+
{
|
391 |
+
$("#repeatspan").html(summary);
|
392 |
+
$("#repeatcheckbox").attr("checked","checked");
|
393 |
+
}
|
394 |
+
|
395 |
+
|
396 |
+
}
|
397 |
+
changeDisplay = function(v)
|
398 |
+
{
|
399 |
+
if (v==1 || v==2 || v==3)
|
400 |
+
$("#intervaldiv").css("display","none");
|
401 |
+
else
|
402 |
+
{
|
403 |
+
$("#intervaldiv").css("display","block");
|
404 |
+
if (v==0) $("#interval_label").html(i18n.dcmvcal.day_plural);
|
405 |
+
else if (v==4) $("#interval_label").html(i18n.dcmvcal.weeks);
|
406 |
+
else if (v==5) $("#interval_label").html(i18n.dcmvcal.months);
|
407 |
+
else if (v==6) $("#interval_label").html(i18n.dcmvcal.years);
|
408 |
+
}
|
409 |
+
if (v==4)
|
410 |
+
$("#bydayweek").css("display","block");
|
411 |
+
else
|
412 |
+
$("#bydayweek").css("display","none"); //none
|
413 |
+
if (v==5 || v==6)
|
414 |
+
$("#bydaymonth").css("display","block");
|
415 |
+
else
|
416 |
+
$("#bydaymonth").css("display","none");
|
417 |
+
summaryDisplay();
|
418 |
+
|
419 |
+
}
|
420 |
+
|
421 |
+
|
422 |
+
$("#freq").val(v_freq);
|
423 |
+
changeDisplay(v_freq);
|
424 |
+
|
425 |
+
$("#freq").change(function(){
|
426 |
+
changeDisplay($(this).val());
|
427 |
+
});
|
428 |
+
$("#interval").change(function(){
|
429 |
+
summaryDisplay();
|
430 |
+
});
|
431 |
+
$("#end_never").change(function(){
|
432 |
+
summaryDisplay();
|
433 |
+
});
|
434 |
+
$("#end_count").change(function(){
|
435 |
+
summaryDisplay();
|
436 |
+
});
|
437 |
+
$("#end_until").change(function(){
|
438 |
+
summaryDisplay();
|
439 |
+
});
|
440 |
+
$("#end_after").change(function(){
|
441 |
+
summaryDisplay();
|
442 |
+
});
|
443 |
+
$("#end_until_input").change(function(){
|
444 |
+
summaryDisplay();
|
445 |
+
});
|
446 |
+
$(".bydayw").change(function(){
|
447 |
+
summaryDisplay();
|
448 |
+
});
|
449 |
+
$(".bydaym").click(function(){
|
450 |
+
summaryDisplay();
|
451 |
+
});
|
452 |
+
|
453 |
+
|
454 |
+
|
455 |
+
|
456 |
+
|
457 |
+
}
|
458 |
+
//loadRepeatData("FREQ=WEEKLY;INTERVAL=3;BYDAY=SU,MO,FR,WE;COUNT=5");
|
459 |
+
//var currentDay = new Date();
|
460 |
+
//loadRepeatData("FREQ=WEEKLY;BYDAY="+weekDays[currentDay.getDay()]+"");
|
461 |
+
if ($("#rrule").val()!="")
|
462 |
+
loadRepeatData($("#rrule").val());
|
463 |
+
|
464 |
+
|
465 |
+
|
466 |
+
});
|
DC_MultiViewCal/src/Plugins/rrule.js
ADDED
@@ -0,0 +1,2278 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*!
|
2 |
+
* rrule.js - Library for working with recurrence rules for calendar dates.
|
3 |
+
* https://github.com/jkbrzt/rrule
|
4 |
+
*
|
5 |
+
* Copyright 2010, Jakub Roztocil and Lars Schoning
|
6 |
+
* Licenced under the BSD licence.
|
7 |
+
* https://github.com/jkbrzt/rrule/blob/master/LICENCE
|
8 |
+
*
|
9 |
+
* Based on:
|
10 |
+
* python-dateutil - Extensions to the standard Python datetime module.
|
11 |
+
* Copyright (c) 2003-2011 - Gustavo Niemeyer <gustavo@niemeyer.net>
|
12 |
+
* Copyright (c) 2012 - Tomi Pieviläinen <tomi.pievilainen@iki.fi>
|
13 |
+
* https://github.com/jkbrzt/rrule/blob/master/LICENCE
|
14 |
+
*
|
15 |
+
*/
|
16 |
+
/* global module, define */
|
17 |
+
|
18 |
+
;(function (root, factory) {
|
19 |
+
if (typeof module === 'object' && module.exports) {
|
20 |
+
module.exports = factory()
|
21 |
+
} else if (typeof define === 'function' && define.amd) {
|
22 |
+
define([], factory)
|
23 |
+
} else {
|
24 |
+
root.RRule = factory(root)
|
25 |
+
root.RRuleSet = root.RRule.RRuleSet
|
26 |
+
root.rrulestr = root.RRule.rrulestr
|
27 |
+
}
|
28 |
+
}(typeof window === 'object' ? window : this, function (root) {
|
29 |
+
// =============================================================================
|
30 |
+
// Date utilities
|
31 |
+
// =============================================================================
|
32 |
+
|
33 |
+
/**
|
34 |
+
* General date-related utilities.
|
35 |
+
* Also handles several incompatibilities between JavaScript and Python
|
36 |
+
*
|
37 |
+
*/
|
38 |
+
var dateutil = {
|
39 |
+
MONTH_DAYS: [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31],
|
40 |
+
|
41 |
+
/**
|
42 |
+
* Number of milliseconds of one day
|
43 |
+
*/
|
44 |
+
ONE_DAY: 1000 * 60 * 60 * 24,
|
45 |
+
|
46 |
+
/**
|
47 |
+
* @see: <http://docs.python.org/library/datetime.html#datetime.MAXYEAR>
|
48 |
+
*/
|
49 |
+
MAXYEAR: 9999,
|
50 |
+
|
51 |
+
/**
|
52 |
+
* Python uses 1-Jan-1 as the base for calculating ordinals but we don't
|
53 |
+
* want to confuse the JS engine with milliseconds > Number.MAX_NUMBER,
|
54 |
+
* therefore we use 1-Jan-1970 instead
|
55 |
+
*/
|
56 |
+
ORDINAL_BASE: new Date(1970, 0, 1),
|
57 |
+
|
58 |
+
/**
|
59 |
+
* Python: MO-SU: 0 - 6
|
60 |
+
* JS: SU-SAT 0 - 6
|
61 |
+
*/
|
62 |
+
PY_WEEKDAYS: [6, 0, 1, 2, 3, 4, 5],
|
63 |
+
|
64 |
+
/**
|
65 |
+
* py_date.timetuple()[7]
|
66 |
+
*/
|
67 |
+
getYearDay: function (date) {
|
68 |
+
var dateNoTime = new Date(
|
69 |
+
date.getFullYear(), date.getMonth(), date.getDate())
|
70 |
+
return Math.ceil(
|
71 |
+
(dateNoTime - new Date(date.getFullYear(), 0, 1)) / dateutil.ONE_DAY) + 1
|
72 |
+
},
|
73 |
+
|
74 |
+
isLeapYear: function (year) {
|
75 |
+
if (year instanceof Date) year = year.getFullYear()
|
76 |
+
return ((year % 4 === 0) && (year % 100 !== 0)) || (year % 400 === 0)
|
77 |
+
},
|
78 |
+
|
79 |
+
/**
|
80 |
+
* @return {Number} the date's timezone offset in ms
|
81 |
+
*/
|
82 |
+
tzOffset: function (date) {
|
83 |
+
return date.getTimezoneOffset() * 60 * 1000
|
84 |
+
},
|
85 |
+
|
86 |
+
/**
|
87 |
+
* @see: <http://www.mcfedries.com/JavaScript/DaysBetween.asp>
|
88 |
+
*/
|
89 |
+
daysBetween: function (date1, date2) {
|
90 |
+
// The number of milliseconds in one day
|
91 |
+
// Convert both dates to milliseconds
|
92 |
+
var date1_ms = date1.getTime() - dateutil.tzOffset(date1)
|
93 |
+
var date2_ms = date2.getTime() - dateutil.tzOffset(date2)
|
94 |
+
// Calculate the difference in milliseconds
|
95 |
+
var difference_ms = Math.abs(date1_ms - date2_ms)
|
96 |
+
// Convert back to days and return
|
97 |
+
return Math.round(difference_ms / dateutil.ONE_DAY)
|
98 |
+
},
|
99 |
+
|
100 |
+
/**
|
101 |
+
* @see: <http://docs.python.org/library/datetime.html#datetime.date.toordinal>
|
102 |
+
*/
|
103 |
+
toOrdinal: function (date) {
|
104 |
+
return dateutil.daysBetween(date, dateutil.ORDINAL_BASE)
|
105 |
+
},
|
106 |
+
|
107 |
+
/**
|
108 |
+
* @see - <http://docs.python.org/library/datetime.html#datetime.date.fromordinal>
|
109 |
+
*/
|
110 |
+
fromOrdinal: function (ordinal) {
|
111 |
+
var millisecsFromBase = ordinal * dateutil.ONE_DAY
|
112 |
+
return new Date(dateutil.ORDINAL_BASE.getTime() -
|
113 |
+
dateutil.tzOffset(dateutil.ORDINAL_BASE) +
|
114 |
+
millisecsFromBase +
|
115 |
+
dateutil.tzOffset(new Date(millisecsFromBase)))
|
116 |
+
},
|
117 |
+
|
118 |
+
/**
|
119 |
+
* @see: <http://docs.python.org/library/calendar.html#calendar.monthrange>
|
120 |
+
*/
|
121 |
+
monthRange: function (year, month) {
|
122 |
+
var date = new Date(year, month, 1)
|
123 |
+
return [dateutil.getWeekday(date), dateutil.getMonthDays(date)]
|
124 |
+
},
|
125 |
+
|
126 |
+
getMonthDays: function (date) {
|
127 |
+
var month = date.getMonth()
|
128 |
+
return month === 1 && dateutil.isLeapYear(date)
|
129 |
+
? 29 : dateutil.MONTH_DAYS[month]
|
130 |
+
},
|
131 |
+
|
132 |
+
/**
|
133 |
+
* @return {Number} python-like weekday
|
134 |
+
*/
|
135 |
+
getWeekday: function (date) {
|
136 |
+
return dateutil.PY_WEEKDAYS[date.getDay()]
|
137 |
+
},
|
138 |
+
|
139 |
+
/**
|
140 |
+
* @see: <http://docs.python.org/library/datetime.html#datetime.datetime.combine>
|
141 |
+
*/
|
142 |
+
combine: function (date, time) {
|
143 |
+
time = time || date
|
144 |
+
return new Date(
|
145 |
+
date.getFullYear(), date.getMonth(), date.getDate(),
|
146 |
+
time.getHours(), time.getMinutes(), time.getSeconds(),
|
147 |
+
time.getMilliseconds())
|
148 |
+
},
|
149 |
+
|
150 |
+
clone: function (date) {
|
151 |
+
var dolly = new Date(date.getTime())
|
152 |
+
return dolly
|
153 |
+
},
|
154 |
+
|
155 |
+
cloneDates: function (dates) {
|
156 |
+
var clones = []
|
157 |
+
for (var i = 0; i < dates.length; i++) {
|
158 |
+
clones.push(dateutil.clone(dates[i]))
|
159 |
+
}
|
160 |
+
return clones
|
161 |
+
},
|
162 |
+
|
163 |
+
/**
|
164 |
+
* Sorts an array of Date or dateutil.Time objects
|
165 |
+
*/
|
166 |
+
sort: function (dates) {
|
167 |
+
dates.sort(function (a, b) {
|
168 |
+
return a.getTime() - b.getTime()
|
169 |
+
})
|
170 |
+
},
|
171 |
+
|
172 |
+
timeToUntilString: function (time) {
|
173 |
+
var comp
|
174 |
+
var date = new Date(time)
|
175 |
+
var comps = [
|
176 |
+
date.getUTCFullYear(),
|
177 |
+
date.getUTCMonth() + 1,
|
178 |
+
date.getUTCDate(),
|
179 |
+
'T',
|
180 |
+
date.getUTCHours(),
|
181 |
+
date.getUTCMinutes(),
|
182 |
+
date.getUTCSeconds(),
|
183 |
+
'Z'
|
184 |
+
]
|
185 |
+
|
186 |
+
for (var i = 0; i < comps.length; i++) {
|
187 |
+
comp = comps[i]
|
188 |
+
if (!/[TZ]/.test(comp) && comp < 10) comps[i] = '0' + String(comp)
|
189 |
+
}
|
190 |
+
return comps.join('')
|
191 |
+
},
|
192 |
+
|
193 |
+
untilStringToDate: function (until) {
|
194 |
+
var re = /^(\d{4})(\d{2})(\d{2})(T(\d{2})(\d{2})(\d{2})Z)?$/
|
195 |
+
var bits = re.exec(until)
|
196 |
+
if (!bits) throw new Error('Invalid UNTIL value: ' + until)
|
197 |
+
return new Date(Date.UTC(
|
198 |
+
bits[1],
|
199 |
+
bits[2] - 1,
|
200 |
+
bits[3],
|
201 |
+
bits[5] || 0,
|
202 |
+
bits[6] || 0,
|
203 |
+
bits[7] || 0))
|
204 |
+
}
|
205 |
+
}
|
206 |
+
|
207 |
+
dateutil.Time = function (hour, minute, second, millisecond) {
|
208 |
+
this.hour = hour
|
209 |
+
this.minute = minute
|
210 |
+
this.second = second
|
211 |
+
this.millisecond = millisecond || 0
|
212 |
+
}
|
213 |
+
|
214 |
+
dateutil.Time.prototype = {
|
215 |
+
constructor: dateutil.Time,
|
216 |
+
getHours: function () {
|
217 |
+
return this.hour
|
218 |
+
},
|
219 |
+
getMinutes: function () {
|
220 |
+
return this.minute
|
221 |
+
},
|
222 |
+
getSeconds: function () {
|
223 |
+
return this.second
|
224 |
+
},
|
225 |
+
getMilliseconds: function () {
|
226 |
+
return this.millisecond
|
227 |
+
},
|
228 |
+
getTime: function () {
|
229 |
+
return ((this.hour * 60 * 60) + (this.minute * 60) + this.second) * 1000 +
|
230 |
+
this.millisecond
|
231 |
+
}
|
232 |
+
}
|
233 |
+
|
234 |
+
// =============================================================================
|
235 |
+
// Helper functions
|
236 |
+
// =============================================================================
|
237 |
+
|
238 |
+
/**
|
239 |
+
* Simplified version of python's range()
|
240 |
+
*/
|
241 |
+
var range = function (start, end) {
|
242 |
+
if (arguments.length === 1) {
|
243 |
+
end = start
|
244 |
+
start = 0
|
245 |
+
}
|
246 |
+
var rang = []
|
247 |
+
for (var i = start; i < end; i++) rang.push(i)
|
248 |
+
return rang
|
249 |
+
}
|
250 |
+
|
251 |
+
var repeat = function (value, times) {
|
252 |
+
var i = 0
|
253 |
+
var array = []
|
254 |
+
|
255 |
+
if (value instanceof Array) {
|
256 |
+
for (; i < times; i++) array[i] = [].concat(value)
|
257 |
+
} else {
|
258 |
+
for (; i < times; i++) array[i] = value
|
259 |
+
}
|
260 |
+
return array
|
261 |
+
}
|
262 |
+
|
263 |
+
/**
|
264 |
+
* Python like split
|
265 |
+
*/
|
266 |
+
var split = function (str, sep, num) {
|
267 |
+
var splits = str.split(sep)
|
268 |
+
return num
|
269 |
+
? splits.slice(0, num).concat([splits.slice(num).join(sep)]) : splits
|
270 |
+
}
|
271 |
+
|
272 |
+
/**
|
273 |
+
* closure/goog/math/math.js:modulo
|
274 |
+
* Copyright 2006 The Closure Library Authors.
|
275 |
+
* The % operator in JavaScript returns the remainder of a / b, but differs from
|
276 |
+
* some other languages in that the result will have the same sign as the
|
277 |
+
* dividend. For example, -1 % 8 == -1, whereas in some other languages
|
278 |
+
* (such as Python) the result would be 7. This function emulates the more
|
279 |
+
* correct modulo behavior, which is useful for certain applications such as
|
280 |
+
* calculating an offset index in a circular list.
|
281 |
+
*
|
282 |
+
* @param {number} a The dividend.
|
283 |
+
* @param {number} b The divisor.
|
284 |
+
* @return {number} a % b where the result is between 0 and b (either 0 <= x < b
|
285 |
+
* or b < x <= 0, depending on the sign of b).
|
286 |
+
*/
|
287 |
+
var pymod = function (a, b) {
|
288 |
+
var r = a % b
|
289 |
+
// If r and b differ in sign, add b to wrap the result to the correct sign.
|
290 |
+
return (r * b < 0) ? r + b : r
|
291 |
+
}
|
292 |
+
|
293 |
+
/**
|
294 |
+
* @see: <http://docs.python.org/library/functions.html#divmod>
|
295 |
+
*/
|
296 |
+
var divmod = function (a, b) {
|
297 |
+
return {div: Math.floor(a / b), mod: pymod(a, b)}
|
298 |
+
}
|
299 |
+
|
300 |
+
/**
|
301 |
+
* Python-like boolean
|
302 |
+
* @return {Boolean} value of an object/primitive, taking into account
|
303 |
+
* the fact that in Python an empty list's/tuple's
|
304 |
+
* boolean value is False, whereas in JS it's true
|
305 |
+
*/
|
306 |
+
var plb = function (obj) {
|
307 |
+
return (obj instanceof Array && obj.length === 0)
|
308 |
+
? false : Boolean(obj)
|
309 |
+
}
|
310 |
+
|
311 |
+
/**
|
312 |
+
* Return true if a value is in an array
|
313 |
+
*/
|
314 |
+
var contains = function (arr, val) {
|
315 |
+
return arr.indexOf(val) !== -1
|
316 |
+
}
|
317 |
+
|
318 |
+
// =============================================================================
|
319 |
+
// Date masks
|
320 |
+
// =============================================================================
|
321 |
+
|
322 |
+
// Every mask is 7 days longer to handle cross-year weekly periods.
|
323 |
+
|
324 |
+
var M365MASK = [].concat(
|
325 |
+
repeat(1, 31), repeat(2, 28), repeat(3, 31),
|
326 |
+
repeat(4, 30), repeat(5, 31), repeat(6, 30),
|
327 |
+
repeat(7, 31), repeat(8, 31), repeat(9, 30),
|
328 |
+
repeat(10, 31), repeat(11, 30), repeat(12, 31),
|
329 |
+
repeat(1, 7))
|
330 |
+
|
331 |
+
var M366MASK = [].concat(
|
332 |
+
repeat(1, 31), repeat(2, 29), repeat(3, 31),
|
333 |
+
repeat(4, 30), repeat(5, 31), repeat(6, 30),
|
334 |
+
repeat(7, 31), repeat(8, 31), repeat(9, 30),
|
335 |
+
repeat(10, 31), repeat(11, 30), repeat(12, 31),
|
336 |
+
repeat(1, 7))
|
337 |
+
|
338 |
+
var M28 = range(1, 29)
|
339 |
+
var M29 = range(1, 30)
|
340 |
+
var M30 = range(1, 31)
|
341 |
+
var M31 = range(1, 32)
|
342 |
+
|
343 |
+
var MDAY366MASK = [].concat(
|
344 |
+
M31, M29, M31,
|
345 |
+
M30, M31, M30,
|
346 |
+
M31, M31, M30,
|
347 |
+
M31, M30, M31,
|
348 |
+
M31.slice(0, 7))
|
349 |
+
|
350 |
+
var MDAY365MASK = [].concat(
|
351 |
+
M31, M28, M31,
|
352 |
+
M30, M31, M30,
|
353 |
+
M31, M31, M30,
|
354 |
+
M31, M30, M31,
|
355 |
+
M31.slice(0, 7))
|
356 |
+
|
357 |
+
M28 = range(-28, 0)
|
358 |
+
M29 = range(-29, 0)
|
359 |
+
M30 = range(-30, 0)
|
360 |
+
M31 = range(-31, 0)
|
361 |
+
|
362 |
+
var NMDAY366MASK = [].concat(
|
363 |
+
M31, M29, M31,
|
364 |
+
M30, M31, M30,
|
365 |
+
M31, M31, M30,
|
366 |
+
M31, M30, M31,
|
367 |
+
M31.slice(0, 7))
|
368 |
+
|
369 |
+
var NMDAY365MASK = [].concat(
|
370 |
+
M31, M28, M31,
|
371 |
+
M30, M31, M30,
|
372 |
+
M31, M31, M30,
|
373 |
+
M31, M30, M31,
|
374 |
+
M31.slice(0, 7))
|
375 |
+
|
376 |
+
var M366RANGE = [0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335, 366]
|
377 |
+
var M365RANGE = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365]
|
378 |
+
|
379 |
+
var WDAYMASK = (function () {
|
380 |
+
for (var wdaymask = [], i = 0; i < 55; i++) wdaymask = wdaymask.concat(range(7))
|
381 |
+
return wdaymask
|
382 |
+
}())
|
383 |
+
|
384 |
+
// =============================================================================
|
385 |
+
// Weekday
|
386 |
+
// =============================================================================
|
387 |
+
|
388 |
+
var Weekday = function (weekday, n) {
|
389 |
+
if (n === 0) throw new Error("Can't create weekday with n == 0")
|
390 |
+
this.weekday = weekday
|
391 |
+
this.n = n
|
392 |
+
}
|
393 |
+
|
394 |
+
Weekday.prototype = {
|
395 |
+
constructor: Weekday,
|
396 |
+
// __call__ - Cannot call the object directly, do it through
|
397 |
+
// e.g. RRule.TH.nth(-1) instead,
|
398 |
+
nth: function (n) {
|
399 |
+
return this.n === n ? this : new Weekday(this.weekday, n)
|
400 |
+
},
|
401 |
+
|
402 |
+
// __eq__
|
403 |
+
equals: function (other) {
|
404 |
+
return this.weekday === other.weekday && this.n === other.n
|
405 |
+
},
|
406 |
+
|
407 |
+
// __repr__
|
408 |
+
toString: function () {
|
409 |
+
var s = ['MO', 'TU', 'WE', 'TH', 'FR', 'SA', 'SU'][this.weekday]
|
410 |
+
if (this.n) s = (this.n > 0 ? '+' : '') + String(this.n) + s
|
411 |
+
return s
|
412 |
+
},
|
413 |
+
|
414 |
+
getJsWeekday: function () {
|
415 |
+
return this.weekday === 6 ? 0 : this.weekday + 1
|
416 |
+
}
|
417 |
+
|
418 |
+
}
|
419 |
+
|
420 |
+
// =============================================================================
|
421 |
+
// RRule
|
422 |
+
// =============================================================================
|
423 |
+
|
424 |
+
/**
|
425 |
+
*
|
426 |
+
* @param {Object?} options - see <http://labix.org/python-dateutil/#head-cf004ee9a75592797e076752b2a889c10f445418>
|
427 |
+
* The only required option is `freq`, one of RRule.YEARLY, RRule.MONTHLY, ...
|
428 |
+
* @constructor
|
429 |
+
*/
|
430 |
+
var RRule = function (options, noCache) {
|
431 |
+
options = options || {}
|
432 |
+
// RFC string
|
433 |
+
this._string = null
|
434 |
+
this._cache = noCache ? null : {
|
435 |
+
all: false,
|
436 |
+
before: [],
|
437 |
+
after: [],
|
438 |
+
between: []
|
439 |
+
}
|
440 |
+
|
441 |
+
// used by toString()
|
442 |
+
this.origOptions = {}
|
443 |
+
|
444 |
+
var invalid = []
|
445 |
+
var keys = Object.keys(options)
|
446 |
+
var defaultKeys = Object.keys(RRule.DEFAULT_OPTIONS)
|
447 |
+
|
448 |
+
// Shallow copy for origOptions and check for invalid
|
449 |
+
keys.forEach(function (key) {
|
450 |
+
this.origOptions[key] = options[key]
|
451 |
+
if (!contains(defaultKeys, key)) invalid.push(key)
|
452 |
+
}, this)
|
453 |
+
|
454 |
+
if (invalid.length) throw new Error('Invalid options: ' + invalid.join(', '))
|
455 |
+
|
456 |
+
if (!RRule.FREQUENCIES[options.freq] && options.byeaster === null) {
|
457 |
+
throw new Error('Invalid frequency: ' + String(options.freq))
|
458 |
+
}
|
459 |
+
|
460 |
+
// Merge in default options
|
461 |
+
defaultKeys.forEach(function (key) {
|
462 |
+
if (!contains(keys, key)) options[key] = RRule.DEFAULT_OPTIONS[key]
|
463 |
+
})
|
464 |
+
|
465 |
+
var opts = this.options = options
|
466 |
+
|
467 |
+
if (opts.byeaster !== null) opts.freq = RRule.YEARLY
|
468 |
+
if (!opts.dtstart) opts.dtstart = new Date()
|
469 |
+
|
470 |
+
var millisecondModulo = opts.dtstart.getTime() % 1000
|
471 |
+
if (opts.wkst === null) {
|
472 |
+
opts.wkst = RRule.MO.weekday
|
473 |
+
} else if (typeof opts.wkst === 'number') {
|
474 |
+
// cool, just keep it like that
|
475 |
+
} else {
|
476 |
+
opts.wkst = opts.wkst.weekday
|
477 |
+
}
|
478 |
+
|
479 |
+
if (opts.bysetpos !== null) {
|
480 |
+
if (typeof opts.bysetpos === 'number') opts.bysetpos = [opts.bysetpos]
|
481 |
+
|
482 |
+
for (var i = 0; i < opts.bysetpos.length; i++) {
|
483 |
+
var v = opts.bysetpos[i]
|
484 |
+
if (v === 0 || !(v >= -366 && v <= 366)) {
|
485 |
+
throw new Error('bysetpos must be between 1 and 366,' +
|
486 |
+
' or between -366 and -1')
|
487 |
+
}
|
488 |
+
}
|
489 |
+
}
|
490 |
+
|
491 |
+
if (!(plb(opts.byweekno) || plb(opts.byyearday) || plb(opts.bymonthday) ||
|
492 |
+
opts.byweekday !== null || opts.byeaster !== null)) {
|
493 |
+
switch (opts.freq) {
|
494 |
+
case RRule.YEARLY:
|
495 |
+
if (!opts.bymonth) opts.bymonth = opts.dtstart.getMonth() + 1
|
496 |
+
opts.bymonthday = opts.dtstart.getDate()
|
497 |
+
break
|
498 |
+
case RRule.MONTHLY:
|
499 |
+
opts.bymonthday = opts.dtstart.getDate()
|
500 |
+
break
|
501 |
+
case RRule.WEEKLY:
|
502 |
+
opts.byweekday = dateutil.getWeekday(opts.dtstart)
|
503 |
+
break
|
504 |
+
}
|
505 |
+
}
|
506 |
+
|
507 |
+
// bymonth
|
508 |
+
if (opts.bymonth !== null && !(opts.bymonth instanceof Array)) {
|
509 |
+
opts.bymonth = [opts.bymonth]
|
510 |
+
}
|
511 |
+
// byyearday
|
512 |
+
if (opts.byyearday !== null && !(opts.byyearday instanceof Array)) {
|
513 |
+
opts.byyearday = [opts.byyearday]
|
514 |
+
}
|
515 |
+
|
516 |
+
// bymonthday
|
517 |
+
if (opts.bymonthday === null) {
|
518 |
+
opts.bymonthday = []
|
519 |
+
opts.bynmonthday = []
|
520 |
+
} else if (opts.bymonthday instanceof Array) {
|
521 |
+
var bymonthday = []
|
522 |
+
var bynmonthday = []
|
523 |
+
|
524 |
+
for (i = 0; i < opts.bymonthday.length; i++) {
|
525 |
+
v = opts.bymonthday[i]
|
526 |
+
if (v > 0) {
|
527 |
+
bymonthday.push(v)
|
528 |
+
} else if (v < 0) {
|
529 |
+
bynmonthday.push(v)
|
530 |
+
}
|
531 |
+
}
|
532 |
+
opts.bymonthday = bymonthday
|
533 |
+
opts.bynmonthday = bynmonthday
|
534 |
+
} else {
|
535 |
+
if (opts.bymonthday < 0) {
|
536 |
+
opts.bynmonthday = [opts.bymonthday]
|
537 |
+
opts.bymonthday = []
|
538 |
+
} else {
|
539 |
+
opts.bynmonthday = []
|
540 |
+
opts.bymonthday = [opts.bymonthday]
|
541 |
+
}
|
542 |
+
}
|
543 |
+
|
544 |
+
// byweekno
|
545 |
+
if (opts.byweekno !== null && !(opts.byweekno instanceof Array)) {
|
546 |
+
opts.byweekno = [opts.byweekno]
|
547 |
+
}
|
548 |
+
|
549 |
+
// byweekday / bynweekday
|
550 |
+
if (opts.byweekday === null) {
|
551 |
+
opts.bynweekday = null
|
552 |
+
} else if (typeof opts.byweekday === 'number') {
|
553 |
+
opts.byweekday = [opts.byweekday]
|
554 |
+
opts.bynweekday = null
|
555 |
+
} else if (opts.byweekday instanceof Weekday) {
|
556 |
+
if (!opts.byweekday.n || opts.freq > RRule.MONTHLY) {
|
557 |
+
opts.byweekday = [opts.byweekday.weekday]
|
558 |
+
opts.bynweekday = null
|
559 |
+
} else {
|
560 |
+
opts.bynweekday = [
|
561 |
+
[opts.byweekday.weekday, opts.byweekday.n]
|
562 |
+
]
|
563 |
+
opts.byweekday = null
|
564 |
+
}
|
565 |
+
} else {
|
566 |
+
var byweekday = []
|
567 |
+
var bynweekday = []
|
568 |
+
|
569 |
+
for (i = 0; i < opts.byweekday.length; i++) {
|
570 |
+
var wday = opts.byweekday[i]
|
571 |
+
|
572 |
+
if (typeof wday === 'number') {
|
573 |
+
byweekday.push(wday)
|
574 |
+
} else if (!wday.n || opts.freq > RRule.MONTHLY) {
|
575 |
+
byweekday.push(wday.weekday)
|
576 |
+
} else {
|
577 |
+
bynweekday.push([wday.weekday, wday.n])
|
578 |
+
}
|
579 |
+
}
|
580 |
+
opts.byweekday = plb(byweekday) ? byweekday : null
|
581 |
+
opts.bynweekday = plb(bynweekday) ? bynweekday : null
|
582 |
+
}
|
583 |
+
|
584 |
+
// byhour
|
585 |
+
if (opts.byhour === null) {
|
586 |
+
opts.byhour = (opts.freq < RRule.HOURLY) ? [opts.dtstart.getHours()] : null
|
587 |
+
} else if (typeof opts.byhour === 'number') {
|
588 |
+
opts.byhour = [opts.byhour]
|
589 |
+
}
|
590 |
+
|
591 |
+
// byminute
|
592 |
+
if (opts.byminute === null) {
|
593 |
+
opts.byminute = (opts.freq < RRule.MINUTELY)
|
594 |
+
? [opts.dtstart.getMinutes()] : null
|
595 |
+
} else if (typeof opts.byminute === 'number') {
|
596 |
+
opts.byminute = [opts.byminute]
|
597 |
+
}
|
598 |
+
|
599 |
+
// bysecond
|
600 |
+
if (opts.bysecond === null) {
|
601 |
+
opts.bysecond = (opts.freq < RRule.SECONDLY)
|
602 |
+
? [opts.dtstart.getSeconds()] : null
|
603 |
+
} else if (typeof opts.bysecond === 'number') {
|
604 |
+
opts.bysecond = [opts.bysecond]
|
605 |
+
}
|
606 |
+
|
607 |
+
if (opts.freq >= RRule.HOURLY) {
|
608 |
+
this.timeset = null
|
609 |
+
} else {
|
610 |
+
this.timeset = []
|
611 |
+
for (i = 0; i < opts.byhour.length; i++) {
|
612 |
+
var hour = opts.byhour[i]
|
613 |
+
for (var j = 0; j < opts.byminute.length; j++) {
|
614 |
+
var minute = opts.byminute[j]
|
615 |
+
for (var k = 0; k < opts.bysecond.length; k++) {
|
616 |
+
var second = opts.bysecond[k]
|
617 |
+
// python:
|
618 |
+
// datetime.time(hour, minute, second,
|
619 |
+
// tzinfo=self._tzinfo))
|
620 |
+
this.timeset.push(new dateutil.Time(hour, minute, second, millisecondModulo))
|
621 |
+
}
|
622 |
+
}
|
623 |
+
}
|
624 |
+
dateutil.sort(this.timeset)
|
625 |
+
}
|
626 |
+
}
|
627 |
+
|
628 |
+
// RRule class 'constants'
|
629 |
+
|
630 |
+
RRule.FREQUENCIES = [
|
631 |
+
'YEARLY', 'MONTHLY', 'WEEKLY', 'DAILY',
|
632 |
+
'HOURLY', 'MINUTELY', 'SECONDLY'
|
633 |
+
]
|
634 |
+
|
635 |
+
RRule.YEARLY = 0
|
636 |
+
RRule.MONTHLY = 1
|
637 |
+
RRule.WEEKLY = 2
|
638 |
+
RRule.DAILY = 3
|
639 |
+
RRule.HOURLY = 4
|
640 |
+
RRule.MINUTELY = 5
|
641 |
+
RRule.SECONDLY = 6
|
642 |
+
|
643 |
+
RRule.MO = new Weekday(0)
|
644 |
+
RRule.TU = new Weekday(1)
|
645 |
+
RRule.WE = new Weekday(2)
|
646 |
+
RRule.TH = new Weekday(3)
|
647 |
+
RRule.FR = new Weekday(4)
|
648 |
+
RRule.SA = new Weekday(5)
|
649 |
+
RRule.SU = new Weekday(6)
|
650 |
+
|
651 |
+
RRule.DEFAULT_OPTIONS = {
|
652 |
+
freq: null,
|
653 |
+
dtstart: null,
|
654 |
+
interval: 1,
|
655 |
+
wkst: RRule.MO,
|
656 |
+
count: null,
|
657 |
+
until: null,
|
658 |
+
bysetpos: null,
|
659 |
+
bymonth: null,
|
660 |
+
bymonthday: null,
|
661 |
+
bynmonthday: null,
|
662 |
+
byyearday: null,
|
663 |
+
byweekno: null,
|
664 |
+
byweekday: null,
|
665 |
+
bynweekday: null,
|
666 |
+
byhour: null,
|
667 |
+
byminute: null,
|
668 |
+
bysecond: null,
|
669 |
+
byeaster: null
|
670 |
+
}
|
671 |
+
|
672 |
+
RRule.parseText = function (text, language) {
|
673 |
+
return getnlp().parseText(text, language)
|
674 |
+
}
|
675 |
+
|
676 |
+
RRule.fromText = function (text, language) {
|
677 |
+
return getnlp().fromText(text, language)
|
678 |
+
}
|
679 |
+
|
680 |
+
RRule.optionsToString = function (options) {
|
681 |
+
var key, value, strValues
|
682 |
+
var pairs = []
|
683 |
+
var keys = Object.keys(options)
|
684 |
+
var defaultKeys = Object.keys(RRule.DEFAULT_OPTIONS)
|
685 |
+
|
686 |
+
for (var i = 0; i < keys.length; i++) {
|
687 |
+
if (!contains(defaultKeys, keys[i])) continue
|
688 |
+
|
689 |
+
key = keys[i].toUpperCase()
|
690 |
+
value = options[keys[i]]
|
691 |
+
strValues = []
|
692 |
+
|
693 |
+
if (value === null || value instanceof Array && !value.length) continue
|
694 |
+
|
695 |
+
switch (key) {
|
696 |
+
case 'FREQ':
|
697 |
+
value = RRule.FREQUENCIES[options.freq]
|
698 |
+
break
|
699 |
+
case 'WKST':
|
700 |
+
value = value.toString()
|
701 |
+
break
|
702 |
+
case 'BYWEEKDAY':
|
703 |
+
/*
|
704 |
+
NOTE: BYWEEKDAY is a special case.
|
705 |
+
RRule() deconstructs the rule.options.byweekday array
|
706 |
+
into an array of Weekday arguments.
|
707 |
+
On the other hand, rule.origOptions is an array of Weekdays.
|
708 |
+
We need to handle both cases here.
|
709 |
+
It might be worth change RRule to keep the Weekdays.
|
710 |
+
|
711 |
+
Also, BYWEEKDAY (used by RRule) vs. BYDAY (RFC)
|
712 |
+
|
713 |
+
*/
|
714 |
+
key = 'BYDAY'
|
715 |
+
if (!(value instanceof Array)) value = [value]
|
716 |
+
|
717 |
+
for (var wday, j = 0; j < value.length; j++) {
|
718 |
+
wday = value[j]
|
719 |
+
if (wday instanceof Weekday) {
|
720 |
+
// good
|
721 |
+
} else if (wday instanceof Array) {
|
722 |
+
wday = new Weekday(wday[0], wday[1])
|
723 |
+
} else {
|
724 |
+
wday = new Weekday(wday)
|
725 |
+
}
|
726 |
+
strValues[j] = wday.toString()
|
727 |
+
}
|
728 |
+
value = strValues
|
729 |
+
break
|
730 |
+
case 'DTSTART':
|
731 |
+
case 'UNTIL':
|
732 |
+
value = dateutil.timeToUntilString(value)
|
733 |
+
break
|
734 |
+
default:
|
735 |
+
if (value instanceof Array) {
|
736 |
+
for (j = 0; j < value.length; j++) strValues[j] = String(value[j])
|
737 |
+
value = strValues
|
738 |
+
} else {
|
739 |
+
value = String(value)
|
740 |
+
}
|
741 |
+
|
742 |
+
}
|
743 |
+
pairs.push([key, value])
|
744 |
+
}
|
745 |
+
|
746 |
+
var strings = []
|
747 |
+
for (i = 0; i < pairs.length; i++) {
|
748 |
+
var attr = pairs[i]
|
749 |
+
strings.push(attr[0] + '=' + attr[1].toString())
|
750 |
+
}
|
751 |
+
return strings.join(';')
|
752 |
+
}
|
753 |
+
|
754 |
+
RRule.prototype = {
|
755 |
+
constructor: RRule,
|
756 |
+
|
757 |
+
/**
|
758 |
+
* @param {Function} iterator - optional function that will be called
|
759 |
+
* on each date that is added. It can return false
|
760 |
+
* to stop the iteration.
|
761 |
+
* @return Array containing all recurrences.
|
762 |
+
*/
|
763 |
+
all: function (iterator) {
|
764 |
+
if (iterator) {
|
765 |
+
return this._iter(new CallbackIterResult('all', {}, iterator))
|
766 |
+
} else {
|
767 |
+
var result = this._cacheGet('all')
|
768 |
+
if (result === false) {
|
769 |
+
result = this._iter(new IterResult('all', {}))
|
770 |
+
this._cacheAdd('all', result)
|
771 |
+
}
|
772 |
+
return result
|
773 |
+
}
|
774 |
+
},
|
775 |
+
|
776 |
+
/**
|
777 |
+
* Returns all the occurrences of the rrule between after and before.
|
778 |
+
* The inc keyword defines what happens if after and/or before are
|
779 |
+
* themselves occurrences. With inc == True, they will be included in the
|
780 |
+
* list, if they are found in the recurrence set.
|
781 |
+
* @return Array
|
782 |
+
*/
|
783 |
+
between: function (after, before, inc, iterator) {
|
784 |
+
var args = {
|
785 |
+
before: before,
|
786 |
+
after: after,
|
787 |
+
inc: inc
|
788 |
+
}
|
789 |
+
|
790 |
+
if (iterator) {
|
791 |
+
return this._iter(new CallbackIterResult('between', args, iterator))
|
792 |
+
}
|
793 |
+
var result = this._cacheGet('between', args)
|
794 |
+
if (result === false) {
|
795 |
+
result = this._iter(new IterResult('between', args))
|
796 |
+
this._cacheAdd('between', result, args)
|
797 |
+
}
|
798 |
+
return result
|
799 |
+
},
|
800 |
+
|
801 |
+
/**
|
802 |
+
* Returns the last recurrence before the given datetime instance.
|
803 |
+
* The inc keyword defines what happens if dt is an occurrence.
|
804 |
+
* With inc == True, if dt itself is an occurrence, it will be returned.
|
805 |
+
* @return Date or null
|
806 |
+
*/
|
807 |
+
before: function (dt, inc) {
|
808 |
+
var args = {dt: dt, inc: inc}
|
809 |
+
var result = this._cacheGet('before', args)
|
810 |
+
if (result === false) {
|
811 |
+
result = this._iter(new IterResult('before', args))
|
812 |
+
this._cacheAdd('before', result, args)
|
813 |
+
}
|
814 |
+
return result
|
815 |
+
},
|
816 |
+
|
817 |
+
/**
|
818 |
+
* Returns the first recurrence after the given datetime instance.
|
819 |
+
* The inc keyword defines what happens if dt is an occurrence.
|
820 |
+
* With inc == True, if dt itself is an occurrence, it will be returned.
|
821 |
+
* @return Date or null
|
822 |
+
*/
|
823 |
+
after: function (dt, inc) {
|
824 |
+
var args = {dt: dt, inc: inc}
|
825 |
+
var result = this._cacheGet('after', args)
|
826 |
+
if (result === false) {
|
827 |
+
result = this._iter(new IterResult('after', args))
|
828 |
+
this._cacheAdd('after', result, args)
|
829 |
+
}
|
830 |
+
return result
|
831 |
+
},
|
832 |
+
|
833 |
+
/**
|
834 |
+
* Returns the number of recurrences in this set. It will have go trough
|
835 |
+
* the whole recurrence, if this hasn't been done before.
|
836 |
+
*/
|
837 |
+
count: function () {
|
838 |
+
return this.all().length
|
839 |
+
},
|
840 |
+
|
841 |
+
/**
|
842 |
+
* Converts the rrule into its string representation
|
843 |
+
* @see <http://www.ietf.org/rfc/rfc2445.txt>
|
844 |
+
* @return String
|
845 |
+
*/
|
846 |
+
toString: function () {
|
847 |
+
return RRule.optionsToString(this.origOptions)
|
848 |
+
},
|
849 |
+
|
850 |
+
/**
|
851 |
+
* Will convert all rules described in nlp:ToText
|
852 |
+
* to text.
|
853 |
+
*/
|
854 |
+
toText: function (gettext, language) {
|
855 |
+
return getnlp().toText(this, gettext, language)
|
856 |
+
},
|
857 |
+
|
858 |
+
isFullyConvertibleToText: function () {
|
859 |
+
return getnlp().isFullyConvertible(this)
|
860 |
+
},
|
861 |
+
|
862 |
+
/**
|
863 |
+
* @param {String} what - all/before/after/between
|
864 |
+
* @param {Array,Date} value - an array of dates, one date, or null
|
865 |
+
* @param {Object?} args - _iter arguments
|
866 |
+
*/
|
867 |
+
_cacheAdd: function (what, value, args) {
|
868 |
+
if (!this._cache) return
|
869 |
+
|
870 |
+
if (value) {
|
871 |
+
value = (value instanceof Date)
|
872 |
+
? dateutil.clone(value) : dateutil.cloneDates(value)
|
873 |
+
}
|
874 |
+
|
875 |
+
if (what === 'all') {
|
876 |
+
this._cache.all = value
|
877 |
+
} else {
|
878 |
+
args._value = value
|
879 |
+
this._cache[what].push(args)
|
880 |
+
}
|
881 |
+
},
|
882 |
+
|
883 |
+
/**
|
884 |
+
* @return false - not in the cache
|
885 |
+
* null - cached, but zero occurrences (before/after)
|
886 |
+
* Date - cached (before/after)
|
887 |
+
* [] - cached, but zero occurrences (all/between)
|
888 |
+
* [Date1, DateN] - cached (all/between)
|
889 |
+
*/
|
890 |
+
_cacheGet: function (what, args) {
|
891 |
+
if (!this._cache) return false
|
892 |
+
|
893 |
+
var cached = false
|
894 |
+
var argsKeys = args ? Object.keys(args) : []
|
895 |
+
var findCacheDiff = function (item) {
|
896 |
+
for (var key, i = 0; i < argsKeys.length; i++) {
|
897 |
+
key = argsKeys[i]
|
898 |
+
if (String(args[key]) !== String(item[key])) return true
|
899 |
+
}
|
900 |
+
return false
|
901 |
+
}
|
902 |
+
|
903 |
+
if (what === 'all') {
|
904 |
+
cached = this._cache.all
|
905 |
+
} else {
|
906 |
+
// Let's see whether we've already called the
|
907 |
+
// 'what' method with the same 'args'
|
908 |
+
for (var item, i = 0; i < this._cache[what].length; i++) {
|
909 |
+
item = this._cache[what][i]
|
910 |
+
if (argsKeys.length && findCacheDiff(item)) continue
|
911 |
+
cached = item._value
|
912 |
+
break
|
913 |
+
}
|
914 |
+
}
|
915 |
+
|
916 |
+
if (!cached && this._cache.all) {
|
917 |
+
// Not in the cache, but we already know all the occurrences,
|
918 |
+
// so we can find the correct dates from the cached ones.
|
919 |
+
var iterResult = new IterResult(what, args)
|
920 |
+
for (i = 0; i < this._cache.all.length; i++) {
|
921 |
+
if (!iterResult.accept(this._cache.all[i])) break
|
922 |
+
}
|
923 |
+
cached = iterResult.getValue()
|
924 |
+
this._cacheAdd(what, cached, args)
|
925 |
+
}
|
926 |
+
|
927 |
+
return cached instanceof Array
|
928 |
+
? dateutil.cloneDates(cached)
|
929 |
+
: (cached instanceof Date ? dateutil.clone(cached) : cached)
|
930 |
+
},
|
931 |
+
|
932 |
+
/**
|
933 |
+
* @return a RRule instance with the same freq and options
|
934 |
+
* as this one (cache is not cloned)
|
935 |
+
*/
|
936 |
+
clone: function () {
|
937 |
+
return new RRule(this.origOptions)
|
938 |
+
},
|
939 |
+
|
940 |
+
_iter: function (iterResult) {
|
941 |
+
/* Since JavaScript doesn't have the python's yield operator (<1.7),
|
942 |
+
we use the IterResult object that tells us when to stop iterating.
|
943 |
+
|
944 |
+
*/
|
945 |
+
|
946 |
+
var dtstart = this.options.dtstart
|
947 |
+
var dtstartMillisecondModulo = this.options.dtstart % 1000
|
948 |
+
|
949 |
+
var year = dtstart.getFullYear()
|
950 |
+
var month = dtstart.getMonth() + 1
|
951 |
+
var day = dtstart.getDate()
|
952 |
+
var hour = dtstart.getHours()
|
953 |
+
var minute = dtstart.getMinutes()
|
954 |
+
var second = dtstart.getSeconds()
|
955 |
+
var weekday = dateutil.getWeekday(dtstart)
|
956 |
+
|
957 |
+
// Some local variables to speed things up a bit
|
958 |
+
var freq = this.options.freq
|
959 |
+
var interval = this.options.interval
|
960 |
+
var wkst = this.options.wkst
|
961 |
+
var until = this.options.until
|
962 |
+
var bymonth = this.options.bymonth
|
963 |
+
var byweekno = this.options.byweekno
|
964 |
+
var byyearday = this.options.byyearday
|
965 |
+
var byweekday = this.options.byweekday
|
966 |
+
var byeaster = this.options.byeaster
|
967 |
+
var bymonthday = this.options.bymonthday
|
968 |
+
var bynmonthday = this.options.bynmonthday
|
969 |
+
var bysetpos = this.options.bysetpos
|
970 |
+
var byhour = this.options.byhour
|
971 |
+
var byminute = this.options.byminute
|
972 |
+
var bysecond = this.options.bysecond
|
973 |
+
|
974 |
+
var ii = new Iterinfo(this)
|
975 |
+
ii.rebuild(year, month)
|
976 |
+
|
977 |
+
var getdayset = {}
|
978 |
+
getdayset[RRule.YEARLY] = ii.ydayset
|
979 |
+
getdayset[RRule.MONTHLY] = ii.mdayset
|
980 |
+
getdayset[RRule.WEEKLY] = ii.wdayset
|
981 |
+
getdayset[RRule.DAILY] = ii.ddayset
|
982 |
+
getdayset[RRule.HOURLY] = ii.ddayset
|
983 |
+
getdayset[RRule.MINUTELY] = ii.ddayset
|
984 |
+
getdayset[RRule.SECONDLY] = ii.ddayset
|
985 |
+
|
986 |
+
getdayset = getdayset[freq]
|
987 |
+
|
988 |
+
var timeset
|
989 |
+
if (freq < RRule.HOURLY) {
|
990 |
+
timeset = this.timeset
|
991 |
+
} else {
|
992 |
+
var gettimeset = {}
|
993 |
+
gettimeset[RRule.HOURLY] = ii.htimeset
|
994 |
+
gettimeset[RRule.MINUTELY] = ii.mtimeset
|
995 |
+
gettimeset[RRule.SECONDLY] = ii.stimeset
|
996 |
+
gettimeset = gettimeset[freq]
|
997 |
+
if ((freq >= RRule.HOURLY && plb(byhour) && !contains(byhour, hour)) ||
|
998 |
+
(freq >= RRule.MINUTELY && plb(byminute) && !contains(byminute, minute)) ||
|
999 |
+
(freq >= RRule.SECONDLY && plb(bysecond) && !contains(bysecond, minute))) {
|
1000 |
+
timeset = []
|
1001 |
+
} else {
|
1002 |
+
timeset = gettimeset.call(ii, hour, minute, second, dtstartMillisecondModulo)
|
1003 |
+
}
|
1004 |
+
}
|
1005 |
+
|
1006 |
+
var total = 0
|
1007 |
+
var count = this.options.count
|
1008 |
+
var i, j, k, dm, div, mod, tmp, pos, dayset, start, end, fixday, filtered
|
1009 |
+
|
1010 |
+
while (true) {
|
1011 |
+
// Get dayset with the right frequency
|
1012 |
+
tmp = getdayset.call(ii, year, month, day)
|
1013 |
+
dayset = tmp[0]
|
1014 |
+
start = tmp[1]
|
1015 |
+
end = tmp[2]
|
1016 |
+
|
1017 |
+
// Do the "hard" work ;-)
|
1018 |
+
filtered = false
|
1019 |
+
for (j = start; j < end; j++) {
|
1020 |
+
i = dayset[j]
|
1021 |
+
|
1022 |
+
filtered = (plb(bymonth) && !contains(bymonth, ii.mmask[i])) ||
|
1023 |
+
(plb(byweekno) && !ii.wnomask[i]) ||
|
1024 |
+
(plb(byweekday) && !contains(byweekday, ii.wdaymask[i])) ||
|
1025 |
+
(plb(ii.nwdaymask) && !ii.nwdaymask[i]) ||
|
1026 |
+
(byeaster !== null && !contains(ii.eastermask, i)) ||
|
1027 |
+
((plb(bymonthday) || plb(bynmonthday)) &&
|
1028 |
+
!contains(bymonthday, ii.mdaymask[i]) &&
|
1029 |
+
!contains(bynmonthday, ii.nmdaymask[i])) ||
|
1030 |
+
(plb(byyearday) &&
|
1031 |
+
((i < ii.yearlen &&
|
1032 |
+
!contains(byyearday, i + 1) &&
|
1033 |
+
!contains(byyearday, -ii.yearlen + i)) ||
|
1034 |
+
(i >= ii.yearlen &&
|
1035 |
+
!contains(byyearday, i + 1 - ii.yearlen) &&
|
1036 |
+
!contains(byyearday, -ii.nextyearlen + i - ii.yearlen))))
|
1037 |
+
|
1038 |
+
if (filtered) dayset[i] = null
|
1039 |
+
}
|
1040 |
+
|
1041 |
+
// Output results
|
1042 |
+
if (plb(bysetpos) && plb(timeset)) {
|
1043 |
+
var daypos, timepos
|
1044 |
+
var poslist = []
|
1045 |
+
|
1046 |
+
for (i, j = 0; j < bysetpos.length; j++) {
|
1047 |
+
pos = bysetpos[j]
|
1048 |
+
|
1049 |
+
if (pos < 0) {
|
1050 |
+
daypos = Math.floor(pos / timeset.length)
|
1051 |
+
timepos = pymod(pos, timeset.length)
|
1052 |
+
} else {
|
1053 |
+
daypos = Math.floor((pos - 1) / timeset.length)
|
1054 |
+
timepos = pymod((pos - 1), timeset.length)
|
1055 |
+
}
|
1056 |
+
|
1057 |
+
try {
|
1058 |
+
tmp = []
|
1059 |
+
for (k = start; k < end; k++) {
|
1060 |
+
var val = dayset[k]
|
1061 |
+
if (val === null) continue
|
1062 |
+
tmp.push(val)
|
1063 |
+
}
|
1064 |
+
if (daypos < 0) {
|
1065 |
+
// we're trying to emulate python's aList[-n]
|
1066 |
+
i = tmp.slice(daypos)[0]
|
1067 |
+
} else {
|
1068 |
+
i = tmp[daypos]
|
1069 |
+
}
|
1070 |
+
|
1071 |
+
var time = timeset[timepos]
|
1072 |
+
var date = dateutil.fromOrdinal(ii.yearordinal + i)
|
1073 |
+
var res = dateutil.combine(date, time)
|
1074 |
+
// XXX: can this ever be in the array?
|
1075 |
+
// - compare the actual date instead?
|
1076 |
+
if (!contains(poslist, res)) poslist.push(res)
|
1077 |
+
} catch (e) {}
|
1078 |
+
}
|
1079 |
+
|
1080 |
+
dateutil.sort(poslist)
|
1081 |
+
for (j = 0; j < poslist.length; j++) {
|
1082 |
+
res = poslist[j]
|
1083 |
+
if (until && res > until) {
|
1084 |
+
this._len = total
|
1085 |
+
return iterResult.getValue()
|
1086 |
+
} else if (res >= dtstart) {
|
1087 |
+
++total
|
1088 |
+
if (!iterResult.accept(res)) return iterResult.getValue()
|
1089 |
+
if (count) {
|
1090 |
+
--count
|
1091 |
+
if (!count) {
|
1092 |
+
this._len = total
|
1093 |
+
return iterResult.getValue()
|
1094 |
+
}
|
1095 |
+
}
|
1096 |
+
}
|
1097 |
+
}
|
1098 |
+
} else {
|
1099 |
+
for (j = start; j < end; j++) {
|
1100 |
+
i = dayset[j]
|
1101 |
+
if (i !== null) {
|
1102 |
+
date = dateutil.fromOrdinal(ii.yearordinal + i)
|
1103 |
+
for (k = 0; k < timeset.length; k++) {
|
1104 |
+
time = timeset[k]
|
1105 |
+
res = dateutil.combine(date, time)
|
1106 |
+
if (until && res > until) {
|
1107 |
+
this._len = total
|
1108 |
+
return iterResult.getValue()
|
1109 |
+
} else if (res >= dtstart) {
|
1110 |
+
++total
|
1111 |
+
if (!iterResult.accept(res)) return iterResult.getValue()
|
1112 |
+
if (count) {
|
1113 |
+
--count
|
1114 |
+
if (!count) {
|
1115 |
+
this._len = total
|
1116 |
+
return iterResult.getValue()
|
1117 |
+
}
|
1118 |
+
}
|
1119 |
+
}
|
1120 |
+
}
|
1121 |
+
}
|
1122 |
+
}
|
1123 |
+
}
|
1124 |
+
|
1125 |
+
// Handle frequency and interval
|
1126 |
+
fixday = false
|
1127 |
+
if (freq === RRule.YEARLY) {
|
1128 |
+
year += interval
|
1129 |
+
if (year > dateutil.MAXYEAR) {
|
1130 |
+
this._len = total
|
1131 |
+
return iterResult.getValue()
|
1132 |
+
}
|
1133 |
+
ii.rebuild(year, month)
|
1134 |
+
} else if (freq === RRule.MONTHLY) {
|
1135 |
+
month += interval
|
1136 |
+
if (month > 12) {
|
1137 |
+
div = Math.floor(month / 12)
|
1138 |
+
mod = pymod(month, 12)
|
1139 |
+
month = mod
|
1140 |
+
year += div
|
1141 |
+
if (month === 0) {
|
1142 |
+
month = 12
|
1143 |
+
--year
|
1144 |
+
}
|
1145 |
+
if (year > dateutil.MAXYEAR) {
|
1146 |
+
this._len = total
|
1147 |
+
return iterResult.getValue()
|
1148 |
+
}
|
1149 |
+
}
|
1150 |
+
ii.rebuild(year, month)
|
1151 |
+
} else if (freq === RRule.WEEKLY) {
|
1152 |
+
if (wkst > weekday) {
|
1153 |
+
day += -(weekday + 1 + (6 - wkst)) + interval * 7
|
1154 |
+
} else {
|
1155 |
+
day += -(weekday - wkst) + interval * 7
|
1156 |
+
}
|
1157 |
+
weekday = wkst
|
1158 |
+
fixday = true
|
1159 |
+
} else if (freq === RRule.DAILY) {
|
1160 |
+
day += interval
|
1161 |
+
fixday = true
|
1162 |
+
} else if (freq === RRule.HOURLY) {
|
1163 |
+
if (filtered) {
|
1164 |
+
// Jump to one iteration before next day
|
1165 |
+
hour += Math.floor((23 - hour) / interval) * interval
|
1166 |
+
}
|
1167 |
+
while (true) {
|
1168 |
+
hour += interval
|
1169 |
+
dm = divmod(hour, 24)
|
1170 |
+
div = dm.div
|
1171 |
+
mod = dm.mod
|
1172 |
+
if (div) {
|
1173 |
+
hour = mod
|
1174 |
+
day += div
|
1175 |
+
fixday = true
|
1176 |
+
}
|
1177 |
+
if (!plb(byhour) || contains(byhour, hour)) break
|
1178 |
+
}
|
1179 |
+
timeset = gettimeset.call(ii, hour, minute, second)
|
1180 |
+
} else if (freq === RRule.MINUTELY) {
|
1181 |
+
if (filtered) {
|
1182 |
+
// Jump to one iteration before next day
|
1183 |
+
minute += Math.floor(
|
1184 |
+
(1439 - (hour * 60 + minute)) / interval) * interval
|
1185 |
+
}
|
1186 |
+
|
1187 |
+
while (true) {
|
1188 |
+
minute += interval
|
1189 |
+
dm = divmod(minute, 60)
|
1190 |
+
div = dm.div
|
1191 |
+
mod = dm.mod
|
1192 |
+
if (div) {
|
1193 |
+
minute = mod
|
1194 |
+
hour += div
|
1195 |
+
dm = divmod(hour, 24)
|
1196 |
+
div = dm.div
|
1197 |
+
mod = dm.mod
|
1198 |
+
if (div) {
|
1199 |
+
hour = mod
|
1200 |
+
day += div
|
1201 |
+
fixday = true
|
1202 |
+
filtered = false
|
1203 |
+
}
|
1204 |
+
}
|
1205 |
+
if ((!plb(byhour) || contains(byhour, hour)) &&
|
1206 |
+
(!plb(byminute) || contains(byminute, minute))) {
|
1207 |
+
break
|
1208 |
+
}
|
1209 |
+
}
|
1210 |
+
timeset = gettimeset.call(ii, hour, minute, second)
|
1211 |
+
} else if (freq === RRule.SECONDLY) {
|
1212 |
+
if (filtered) {
|
1213 |
+
// Jump to one iteration before next day
|
1214 |
+
second += Math.floor(
|
1215 |
+
(86399 - (hour * 3600 + minute * 60 + second)) / interval) * interval
|
1216 |
+
}
|
1217 |
+
while (true) {
|
1218 |
+
second += interval
|
1219 |
+
dm = divmod(second, 60)
|
1220 |
+
div = dm.div
|
1221 |
+
mod = dm.mod
|
1222 |
+
if (div) {
|
1223 |
+
second = mod
|
1224 |
+
minute += div
|
1225 |
+
dm = divmod(minute, 60)
|
1226 |
+
div = dm.div
|
1227 |
+
mod = dm.mod
|
1228 |
+
if (div) {
|
1229 |
+
minute = mod
|
1230 |
+
hour += div
|
1231 |
+
dm = divmod(hour, 24)
|
1232 |
+
div = dm.div
|
1233 |
+
mod = dm.mod
|
1234 |
+
if (div) {
|
1235 |
+
hour = mod
|
1236 |
+
day += div
|
1237 |
+
fixday = true
|
1238 |
+
}
|
1239 |
+
}
|
1240 |
+
}
|
1241 |
+
if ((!plb(byhour) || contains(byhour, hour)) &&
|
1242 |
+
(!plb(byminute) || contains(byminute, minute)) &&
|
1243 |
+
(!plb(bysecond) || contains(bysecond, second))) {
|
1244 |
+
break
|
1245 |
+
}
|
1246 |
+
}
|
1247 |
+
timeset = gettimeset.call(ii, hour, minute, second)
|
1248 |
+
}
|
1249 |
+
|
1250 |
+
if (fixday && day > 28) {
|
1251 |
+
var daysinmonth = dateutil.monthRange(year, month - 1)[1]
|
1252 |
+
if (day > daysinmonth) {
|
1253 |
+
while (day > daysinmonth) {
|
1254 |
+
day -= daysinmonth
|
1255 |
+
++month
|
1256 |
+
if (month === 13) {
|
1257 |
+
month = 1
|
1258 |
+
++year
|
1259 |
+
if (year > dateutil.MAXYEAR) {
|
1260 |
+
this._len = total
|
1261 |
+
return iterResult.getValue()
|
1262 |
+
}
|
1263 |
+
}
|
1264 |
+
daysinmonth = dateutil.monthRange(year, month - 1)[1]
|
1265 |
+
}
|
1266 |
+
ii.rebuild(year, month)
|
1267 |
+
}
|
1268 |
+
}
|
1269 |
+
}
|
1270 |
+
}
|
1271 |
+
|
1272 |
+
}
|
1273 |
+
|
1274 |
+
RRule.parseString = function (rfcString) {
|
1275 |
+
rfcString = rfcString.replace(/^\s+|\s+$/, '')
|
1276 |
+
if (!rfcString.length) return null
|
1277 |
+
|
1278 |
+
var i, j, key, value, attr
|
1279 |
+
var attrs = rfcString.split(';')
|
1280 |
+
var options = {}
|
1281 |
+
|
1282 |
+
for (i = 0; i < attrs.length; i++) {
|
1283 |
+
attr = attrs[i].split('=')
|
1284 |
+
key = attr[0]
|
1285 |
+
value = attr[1]
|
1286 |
+
switch (key) {
|
1287 |
+
case 'FREQ':
|
1288 |
+
options.freq = RRule[value]
|
1289 |
+
break
|
1290 |
+
case 'WKST':
|
1291 |
+
options.wkst = RRule[value]
|
1292 |
+
break
|
1293 |
+
case 'COUNT':
|
1294 |
+
case 'INTERVAL':
|
1295 |
+
case 'BYSETPOS':
|
1296 |
+
case 'BYMONTH':
|
1297 |
+
case 'BYMONTHDAY':
|
1298 |
+
case 'BYYEARDAY':
|
1299 |
+
case 'BYWEEKNO':
|
1300 |
+
case 'BYHOUR':
|
1301 |
+
case 'BYMINUTE':
|
1302 |
+
case 'BYSECOND':
|
1303 |
+
if (value.indexOf(',') !== -1) {
|
1304 |
+
value = value.split(',')
|
1305 |
+
for (j = 0; j < value.length; j++) {
|
1306 |
+
if (/^[+-]?\d+$/.test(value[j])) value[j] = Number(value[j])
|
1307 |
+
}
|
1308 |
+
} else if (/^[+-]?\d+$/.test(value)) {
|
1309 |
+
value = Number(value)
|
1310 |
+
}
|
1311 |
+
key = key.toLowerCase()
|
1312 |
+
options[key] = value
|
1313 |
+
break
|
1314 |
+
case 'BYDAY': // => byweekday
|
1315 |
+
var n, wday, day
|
1316 |
+
var days = value.split(',')
|
1317 |
+
|
1318 |
+
options.byweekday = []
|
1319 |
+
for (j = 0; j < days.length; j++) {
|
1320 |
+
day = days[j]
|
1321 |
+
if (day.length === 2) { // MO, TU, ...
|
1322 |
+
wday = RRule[day] // wday instanceof Weekday
|
1323 |
+
options.byweekday.push(wday)
|
1324 |
+
} else { // -1MO, +3FR, 1SO, ...
|
1325 |
+
day = day.match(/^([+-]?\d)([A-Z]{2})$/)
|
1326 |
+
n = Number(day[1])
|
1327 |
+
wday = day[2]
|
1328 |
+
wday = RRule[wday].weekday
|
1329 |
+
options.byweekday.push(new Weekday(wday, n))
|
1330 |
+
}
|
1331 |
+
}
|
1332 |
+
break
|
1333 |
+
case 'DTSTART':
|
1334 |
+
options.dtstart = dateutil.untilStringToDate(value)
|
1335 |
+
break
|
1336 |
+
case 'UNTIL':
|
1337 |
+
options.until = dateutil.untilStringToDate(value)
|
1338 |
+
break
|
1339 |
+
case 'BYEASTER':
|
1340 |
+
options.byeaster = Number(value)
|
1341 |
+
break
|
1342 |
+
default:
|
1343 |
+
throw new Error("Unknown RRULE property '" + key + "'")
|
1344 |
+
}
|
1345 |
+
}
|
1346 |
+
return options
|
1347 |
+
}
|
1348 |
+
|
1349 |
+
RRule.fromString = function (string) {
|
1350 |
+
return new RRule(RRule.parseString(string))
|
1351 |
+
}
|
1352 |
+
|
1353 |
+
// =============================================================================
|
1354 |
+
// Iterinfo
|
1355 |
+
// =============================================================================
|
1356 |
+
|
1357 |
+
var Iterinfo = function (rrule) {
|
1358 |
+
this.rrule = rrule
|
1359 |
+
this.lastyear = null
|
1360 |
+
this.lastmonth = null
|
1361 |
+
this.yearlen = null
|
1362 |
+
this.nextyearlen = null
|
1363 |
+
this.yearordinal = null
|
1364 |
+
this.yearweekday = null
|
1365 |
+
this.mmask = null
|
1366 |
+
this.mrange = null
|
1367 |
+
this.mdaymask = null
|
1368 |
+
this.nmdaymask = null
|
1369 |
+
this.wdaymask = null
|
1370 |
+
this.wnomask = null
|
1371 |
+
this.nwdaymask = null
|
1372 |
+
this.eastermask = null
|
1373 |
+
}
|
1374 |
+
|
1375 |
+
Iterinfo.prototype.easter = function (y, offset) {
|
1376 |
+
offset = offset || 0
|
1377 |
+
|
1378 |
+
var a = y % 19
|
1379 |
+
var b = Math.floor(y / 100)
|
1380 |
+
var c = y % 100
|
1381 |
+
var d = Math.floor(b / 4)
|
1382 |
+
var e = b % 4
|
1383 |
+
var f = Math.floor((b + 8) / 25)
|
1384 |
+
var g = Math.floor((b - f + 1) / 3)
|
1385 |
+
var h = Math.floor(19 * a + b - d - g + 15) % 30
|
1386 |
+
var i = Math.floor(c / 4)
|
1387 |
+
var k = c % 4
|
1388 |
+
var l = Math.floor(32 + 2 * e + 2 * i - h - k) % 7
|
1389 |
+
var m = Math.floor((a + 11 * h + 22 * l) / 451)
|
1390 |
+
var month = Math.floor((h + l - 7 * m + 114) / 31)
|
1391 |
+
var day = (h + l - 7 * m + 114) % 31 + 1
|
1392 |
+
var date = Date.UTC(y, month - 1, day + offset)
|
1393 |
+
var yearStart = Date.UTC(y, 0, 1)
|
1394 |
+
|
1395 |
+
return [Math.ceil((date - yearStart) / (1000 * 60 * 60 * 24))]
|
1396 |
+
}
|
1397 |
+
|
1398 |
+
Iterinfo.prototype.rebuild = function (year, month) {
|
1399 |
+
var rr = this.rrule
|
1400 |
+
|
1401 |
+
if (year !== this.lastyear) {
|
1402 |
+
this.yearlen = dateutil.isLeapYear(year) ? 366 : 365
|
1403 |
+
this.nextyearlen = dateutil.isLeapYear(year + 1) ? 366 : 365
|
1404 |
+
var firstyday = new Date(year, 0, 1)
|
1405 |
+
|
1406 |
+
this.yearordinal = dateutil.toOrdinal(firstyday)
|
1407 |
+
this.yearweekday = dateutil.getWeekday(firstyday)
|
1408 |
+
|
1409 |
+
var wday = dateutil.getWeekday(new Date(year, 0, 1))
|
1410 |
+
|
1411 |
+
if (this.yearlen === 365) {
|
1412 |
+
this.mmask = [].concat(M365MASK)
|
1413 |
+
this.mdaymask = [].concat(MDAY365MASK)
|
1414 |
+
this.nmdaymask = [].concat(NMDAY365MASK)
|
1415 |
+
this.wdaymask = WDAYMASK.slice(wday)
|
1416 |
+
this.mrange = [].concat(M365RANGE)
|
1417 |
+
} else {
|
1418 |
+
this.mmask = [].concat(M366MASK)
|
1419 |
+
this.mdaymask = [].concat(MDAY366MASK)
|
1420 |
+
this.nmdaymask = [].concat(NMDAY366MASK)
|
1421 |
+
this.wdaymask = WDAYMASK.slice(wday)
|
1422 |
+
this.mrange = [].concat(M366RANGE)
|
1423 |
+
}
|
1424 |
+
|
1425 |
+
if (!plb(rr.options.byweekno)) {
|
1426 |
+
this.wnomask = null
|
1427 |
+
} else {
|
1428 |
+
this.wnomask = repeat(0, this.yearlen + 7)
|
1429 |
+
var no1wkst, firstwkst, wyearlen
|
1430 |
+
no1wkst = firstwkst = pymod(7 - this.yearweekday + rr.options.wkst, 7)
|
1431 |
+
if (no1wkst >= 4) {
|
1432 |
+
no1wkst = 0
|
1433 |
+
// Number of days in the year, plus the days we got
|
1434 |
+
// from last year.
|
1435 |
+
wyearlen = this.yearlen + pymod(this.yearweekday - rr.options.wkst, 7)
|
1436 |
+
} else {
|
1437 |
+
// Number of days in the year, minus the days we
|
1438 |
+
// left in last year.
|
1439 |
+
wyearlen = this.yearlen - no1wkst
|
1440 |
+
}
|
1441 |
+
var div = Math.floor(wyearlen / 7)
|
1442 |
+
var mod = pymod(wyearlen, 7)
|
1443 |
+
var numweeks = Math.floor(div + (mod / 4))
|
1444 |
+
for (var n, i, j = 0; j < rr.options.byweekno.length; j++) {
|
1445 |
+
n = rr.options.byweekno[j]
|
1446 |
+
if (n < 0) {
|
1447 |
+
n += numweeks + 1
|
1448 |
+
} if (!(n > 0 && n <= numweeks)) {
|
1449 |
+
continue
|
1450 |
+
} if (n > 1) {
|
1451 |
+
i = no1wkst + (n - 1) * 7
|
1452 |
+
if (no1wkst !== firstwkst) {
|
1453 |
+
i -= 7 - firstwkst
|
1454 |
+
}
|
1455 |
+
} else {
|
1456 |
+
i = no1wkst
|
1457 |
+
}
|
1458 |
+
for (var k = 0; k < 7; k++) {
|
1459 |
+
this.wnomask[i] = 1
|
1460 |
+
i++
|
1461 |
+
if (this.wdaymask[i] === rr.options.wkst) break
|
1462 |
+
}
|
1463 |
+
}
|
1464 |
+
|
1465 |
+
if (contains(rr.options.byweekno, 1)) {
|
1466 |
+
// Check week number 1 of next year as well
|
1467 |
+
// orig-TODO : Check -numweeks for next year.
|
1468 |
+
i = no1wkst + numweeks * 7
|
1469 |
+
if (no1wkst !== firstwkst) i -= 7 - firstwkst
|
1470 |
+
if (i < this.yearlen) {
|
1471 |
+
// If week starts in next year, we
|
1472 |
+
// don't care about it.
|
1473 |
+
for (j = 0; j < 7; j++) {
|
1474 |
+
this.wnomask[i] = 1
|
1475 |
+
i += 1
|
1476 |
+
if (this.wdaymask[i] === rr.options.wkst) break
|
1477 |
+
}
|
1478 |
+
}
|
1479 |
+
}
|
1480 |
+
|
1481 |
+
if (no1wkst) {
|
1482 |
+
// Check last week number of last year as
|
1483 |
+
// well. If no1wkst is 0, either the year
|
1484 |
+
// started on week start, or week number 1
|
1485 |
+
// got days from last year, so there are no
|
1486 |
+
// days from last year's last week number in
|
1487 |
+
// this year.
|
1488 |
+
var lnumweeks
|
1489 |
+
if (!contains(rr.options.byweekno, -1)) {
|
1490 |
+
var lyearweekday = dateutil.getWeekday(new Date(year - 1, 0, 1))
|
1491 |
+
var lno1wkst = pymod(7 - lyearweekday + rr.options.wkst, 7)
|
1492 |
+
var lyearlen = dateutil.isLeapYear(year - 1) ? 366 : 365
|
1493 |
+
if (lno1wkst >= 4) {
|
1494 |
+
lno1wkst = 0
|
1495 |
+
lnumweeks = Math.floor(52 +
|
1496 |
+
pymod(lyearlen + pymod(lyearweekday - rr.options.wkst, 7), 7) / 4)
|
1497 |
+
} else {
|
1498 |
+
lnumweeks = Math.floor(52 + pymod(this.yearlen - no1wkst, 7) / 4)
|
1499 |
+
}
|
1500 |
+
} else {
|
1501 |
+
lnumweeks = -1
|
1502 |
+
}
|
1503 |
+
if (contains(rr.options.byweekno, lnumweeks)) {
|
1504 |
+
for (i = 0; i < no1wkst; i++) this.wnomask[i] = 1
|
1505 |
+
}
|
1506 |
+
}
|
1507 |
+
}
|
1508 |
+
}
|
1509 |
+
|
1510 |
+
if (plb(rr.options.bynweekday) && (month !== this.lastmonth || year !== this.lastyear)) {
|
1511 |
+
var ranges = []
|
1512 |
+
if (rr.options.freq === RRule.YEARLY) {
|
1513 |
+
if (plb(rr.options.bymonth)) {
|
1514 |
+
for (j = 0; j < rr.options.bymonth.length; j++) {
|
1515 |
+
month = rr.options.bymonth[j]
|
1516 |
+
ranges.push(this.mrange.slice(month - 1, month + 1))
|
1517 |
+
}
|
1518 |
+
} else {
|
1519 |
+
ranges = [[0, this.yearlen]]
|
1520 |
+
}
|
1521 |
+
} else if (rr.options.freq === RRule.MONTHLY) {
|
1522 |
+
ranges = [this.mrange.slice(month - 1, month + 1)]
|
1523 |
+
}
|
1524 |
+
if (plb(ranges)) {
|
1525 |
+
// Weekly frequency won't get here, so we may not
|
1526 |
+
// care about cross-year weekly periods.
|
1527 |
+
this.nwdaymask = repeat(0, this.yearlen)
|
1528 |
+
|
1529 |
+
for (j = 0; j < ranges.length; j++) {
|
1530 |
+
var rang = ranges[j]
|
1531 |
+
var first = rang[0]
|
1532 |
+
var last = rang[1]
|
1533 |
+
last -= 1
|
1534 |
+
for (k = 0; k < rr.options.bynweekday.length; k++) {
|
1535 |
+
wday = rr.options.bynweekday[k][0]
|
1536 |
+
n = rr.options.bynweekday[k][1]
|
1537 |
+
if (n < 0) {
|
1538 |
+
i = last + (n + 1) * 7
|
1539 |
+
i -= pymod(this.wdaymask[i] - wday, 7)
|
1540 |
+
} else {
|
1541 |
+
i = first + (n - 1) * 7
|
1542 |
+
i += pymod(7 - this.wdaymask[i] + wday, 7)
|
1543 |
+
}
|
1544 |
+
if (first <= i && i <= last) this.nwdaymask[i] = 1
|
1545 |
+
}
|
1546 |
+
}
|
1547 |
+
}
|
1548 |
+
|
1549 |
+
this.lastyear = year
|
1550 |
+
this.lastmonth = month
|
1551 |
+
}
|
1552 |
+
|
1553 |
+
if (rr.options.byeaster !== null) {
|
1554 |
+
this.eastermask = this.easter(year, rr.options.byeaster)
|
1555 |
+
}
|
1556 |
+
}
|
1557 |
+
|
1558 |
+
Iterinfo.prototype.ydayset = function (year, month, day) {
|
1559 |
+
return [range(this.yearlen), 0, this.yearlen]
|
1560 |
+
}
|
1561 |
+
|
1562 |
+
Iterinfo.prototype.mdayset = function (year, month, day) {
|
1563 |
+
var set = repeat(null, this.yearlen)
|
1564 |
+
var start = this.mrange[month - 1]
|
1565 |
+
var end = this.mrange[month]
|
1566 |
+
for (var i = start; i < end; i++) set[i] = i
|
1567 |
+
return [set, start, end]
|
1568 |
+
}
|
1569 |
+
|
1570 |
+
Iterinfo.prototype.wdayset = function (year, month, day) {
|
1571 |
+
// We need to handle cross-year weeks here.
|
1572 |
+
var set = repeat(null, this.yearlen + 7)
|
1573 |
+
var i = dateutil.toOrdinal(new Date(year, month - 1, day)) - this.yearordinal
|
1574 |
+
var start = i
|
1575 |
+
for (var j = 0; j < 7; j++) {
|
1576 |
+
set[i] = i
|
1577 |
+
++i
|
1578 |
+
if (this.wdaymask[i] === this.rrule.options.wkst) break
|
1579 |
+
}
|
1580 |
+
return [set, start, i]
|
1581 |
+
}
|
1582 |
+
|
1583 |
+
Iterinfo.prototype.ddayset = function (year, month, day) {
|
1584 |
+
var set = repeat(null, this.yearlen)
|
1585 |
+
var i = dateutil.toOrdinal(new Date(year, month - 1, day)) - this.yearordinal
|
1586 |
+
set[i] = i
|
1587 |
+
return [set, i, i + 1]
|
1588 |
+
}
|
1589 |
+
|
1590 |
+
Iterinfo.prototype.htimeset = function (hour, minute, second, millisecond) {
|
1591 |
+
var set = []
|
1592 |
+
var rr = this.rrule
|
1593 |
+
for (var i = 0; i < rr.options.byminute.length; i++) {
|
1594 |
+
minute = rr.options.byminute[i]
|
1595 |
+
for (var j = 0; j < rr.options.bysecond.length; j++) {
|
1596 |
+
second = rr.options.bysecond[j]
|
1597 |
+
set.push(new dateutil.Time(hour, minute, second, millisecond))
|
1598 |
+
}
|
1599 |
+
}
|
1600 |
+
dateutil.sort(set)
|
1601 |
+
return set
|
1602 |
+
}
|
1603 |
+
|
1604 |
+
Iterinfo.prototype.mtimeset = function (hour, minute, second, millisecond) {
|
1605 |
+
var set = []
|
1606 |
+
var rr = this.rrule
|
1607 |
+
for (var j = 0; j < rr.options.bysecond.length; j++) {
|
1608 |
+
second = rr.options.bysecond[j]
|
1609 |
+
set.push(new dateutil.Time(hour, minute, second, millisecond))
|
1610 |
+
}
|
1611 |
+
dateutil.sort(set)
|
1612 |
+
return set
|
1613 |
+
}
|
1614 |
+
|
1615 |
+
Iterinfo.prototype.stimeset = function (hour, minute, second, millisecond) {
|
1616 |
+
return [new dateutil.Time(hour, minute, second, millisecond)]
|
1617 |
+
}
|
1618 |
+
|
1619 |
+
// =============================================================================
|
1620 |
+
// Results
|
1621 |
+
// =============================================================================
|
1622 |
+
|
1623 |
+
/**
|
1624 |
+
* This class helps us to emulate python's generators, sorta.
|
1625 |
+
*/
|
1626 |
+
var IterResult = function (method, args) {
|
1627 |
+
this.init(method, args)
|
1628 |
+
}
|
1629 |
+
|
1630 |
+
IterResult.prototype = {
|
1631 |
+
constructor: IterResult,
|
1632 |
+
init: function (method, args) {
|
1633 |
+
this.method = method
|
1634 |
+
this.args = args
|
1635 |
+
this.minDate = null
|
1636 |
+
this.maxDate = null
|
1637 |
+
this._result = []
|
1638 |
+
|
1639 |
+
if (method === 'between') {
|
1640 |
+
this.maxDate = args.inc
|
1641 |
+
? args.before : new Date(args.before.getTime() - 1)
|
1642 |
+
this.minDate = args.inc
|
1643 |
+
? args.after : new Date(args.after.getTime() + 1)
|
1644 |
+
} else if (method === 'before') {
|
1645 |
+
this.maxDate = args.inc ? args.dt : new Date(args.dt.getTime() - 1)
|
1646 |
+
} else if (method === 'after') {
|
1647 |
+
this.minDate = args.inc ? args.dt : new Date(args.dt.getTime() + 1)
|
1648 |
+
}
|
1649 |
+
},
|
1650 |
+
|
1651 |
+
/**
|
1652 |
+
* Possibly adds a date into the result.
|
1653 |
+
*
|
1654 |
+
* @param {Date} date - the date isn't necessarly added to the result
|
1655 |
+
* list (if it is too late/too early)
|
1656 |
+
* @return {Boolean} true if it makes sense to continue the iteration
|
1657 |
+
* false if we're done.
|
1658 |
+
*/
|
1659 |
+
accept: function (date) {
|
1660 |
+
var tooEarly = this.minDate && date < this.minDate
|
1661 |
+
var tooLate = this.maxDate && date > this.maxDate
|
1662 |
+
|
1663 |
+
if (this.method === 'between') {
|
1664 |
+
if (tooEarly) return true
|
1665 |
+
if (tooLate) return false
|
1666 |
+
} else if (this.method === 'before') {
|
1667 |
+
if (tooLate) return false
|
1668 |
+
} else if (this.method === 'after') {
|
1669 |
+
if (tooEarly) return true
|
1670 |
+
this.add(date)
|
1671 |
+
return false
|
1672 |
+
}
|
1673 |
+
|
1674 |
+
return this.add(date)
|
1675 |
+
},
|
1676 |
+
|
1677 |
+
/**
|
1678 |
+
*
|
1679 |
+
* @param {Date} date that is part of the result.
|
1680 |
+
* @return {Boolean} whether we are interested in more values.
|
1681 |
+
*/
|
1682 |
+
add: function (date) {
|
1683 |
+
this._result.push(date)
|
1684 |
+
return true
|
1685 |
+
},
|
1686 |
+
|
1687 |
+
/**
|
1688 |
+
* 'before' and 'after' return only one date, whereas 'all'
|
1689 |
+
* and 'between' an array.
|
1690 |
+
* @return {Date,Array?}
|
1691 |
+
*/
|
1692 |
+
getValue: function () {
|
1693 |
+
var res = this._result
|
1694 |
+
switch (this.method) {
|
1695 |
+
case 'all':
|
1696 |
+
case 'between':
|
1697 |
+
return res
|
1698 |
+
case 'before':
|
1699 |
+
case 'after':
|
1700 |
+
return res.length ? res[res.length - 1] : null
|
1701 |
+
}
|
1702 |
+
},
|
1703 |
+
|
1704 |
+
clone: function () {
|
1705 |
+
return new IterResult(this.method, this.args)
|
1706 |
+
}
|
1707 |
+
}
|
1708 |
+
|
1709 |
+
/**
|
1710 |
+
* IterResult subclass that calls a callback function on each add,
|
1711 |
+
* and stops iterating when the callback returns false.
|
1712 |
+
*/
|
1713 |
+
var CallbackIterResult = function (method, args, iterator) {
|
1714 |
+
var allowedMethods = ['all', 'between']
|
1715 |
+
if (!contains(allowedMethods, method)) {
|
1716 |
+
throw new Error('Invalid method "' + method +
|
1717 |
+
'". Only all and between works with iterator.')
|
1718 |
+
}
|
1719 |
+
this.add = function (date) {
|
1720 |
+
if (iterator(date, this._result.length)) {
|
1721 |
+
this._result.push(date)
|
1722 |
+
return true
|
1723 |
+
}
|
1724 |
+
return false
|
1725 |
+
}
|
1726 |
+
|
1727 |
+
this.init(method, args)
|
1728 |
+
}
|
1729 |
+
CallbackIterResult.prototype = IterResult.prototype
|
1730 |
+
|
1731 |
+
/**
|
1732 |
+
*
|
1733 |
+
* @param {Boolean?} noCache
|
1734 |
+
* The same stratagy as RRule on cache, default to false
|
1735 |
+
* @constructor
|
1736 |
+
*/
|
1737 |
+
|
1738 |
+
var RRuleSet = function (noCache) {
|
1739 |
+
// Let RRuleSet cacheable
|
1740 |
+
this._cache = noCache ? null : {
|
1741 |
+
all: false,
|
1742 |
+
before: [],
|
1743 |
+
after: [],
|
1744 |
+
between: []
|
1745 |
+
}
|
1746 |
+
this._rrule = []
|
1747 |
+
this._rdate = []
|
1748 |
+
this._exrule = []
|
1749 |
+
this._exdate = []
|
1750 |
+
}
|
1751 |
+
|
1752 |
+
RRuleSet.prototype = {
|
1753 |
+
constructor: RRuleSet,
|
1754 |
+
|
1755 |
+
/**
|
1756 |
+
* @param {RRule}
|
1757 |
+
*/
|
1758 |
+
rrule: function (rrule) {
|
1759 |
+
if (!(rrule instanceof RRule)) {
|
1760 |
+
throw new TypeError(String(rrule) + ' is not RRule instance')
|
1761 |
+
}
|
1762 |
+
if (!contains(this._rrule.map(String), String(rrule))) {
|
1763 |
+
this._rrule.push(rrule)
|
1764 |
+
}
|
1765 |
+
},
|
1766 |
+
|
1767 |
+
/**
|
1768 |
+
* @param {Date}
|
1769 |
+
*/
|
1770 |
+
rdate: function (date) {
|
1771 |
+
if (!(date instanceof Date)) {
|
1772 |
+
throw new TypeError(String(date) + ' is not Date instance')
|
1773 |
+
}
|
1774 |
+
if (!contains(this._rdate.map(Number), Number(date))) {
|
1775 |
+
this._rdate.push(date)
|
1776 |
+
dateutil.sort(this._rdate)
|
1777 |
+
}
|
1778 |
+
},
|
1779 |
+
|
1780 |
+
/**
|
1781 |
+
* @param {RRule}
|
1782 |
+
*/
|
1783 |
+
exrule: function (rrule) {
|
1784 |
+
if (!(rrule instanceof RRule)) {
|
1785 |
+
throw new TypeError(String(rrule) + ' is not RRule instance')
|
1786 |
+
}
|
1787 |
+
if (!contains(this._exrule.map(String), String(rrule))) {
|
1788 |
+
this._exrule.push(rrule)
|
1789 |
+
}
|
1790 |
+
},
|
1791 |
+
|
1792 |
+
/**
|
1793 |
+
* @param {Date}
|
1794 |
+
*/
|
1795 |
+
exdate: function (date) {
|
1796 |
+
if (!(date instanceof Date)) {
|
1797 |
+
throw new TypeError(String(date) + ' is not Date instance')
|
1798 |
+
}
|
1799 |
+
if (!contains(this._exdate.map(Number), Number(date))) {
|
1800 |
+
this._exdate.push(date)
|
1801 |
+
dateutil.sort(this._exdate)
|
1802 |
+
}
|
1803 |
+
},
|
1804 |
+
|
1805 |
+
valueOf: function () {
|
1806 |
+
var result = []
|
1807 |
+
if (this._rrule.length) {
|
1808 |
+
this._rrule.forEach(function (rrule) {
|
1809 |
+
result.push('RRULE:' + rrule)
|
1810 |
+
})
|
1811 |
+
}
|
1812 |
+
if (this._rdate.length) {
|
1813 |
+
result.push('RDATE:' + this._rdate.map(function (rdate) {
|
1814 |
+
return dateutil.timeToUntilString(rdate)
|
1815 |
+
}).join(','))
|
1816 |
+
}
|
1817 |
+
if (this._exrule.length) {
|
1818 |
+
this._exrule.forEach(function (exrule) {
|
1819 |
+
result.push('EXRULE:' + exrule)
|
1820 |
+
})
|
1821 |
+
}
|
1822 |
+
if (this._exdate.length) {
|
1823 |
+
result.push('EXDATE:' + this._exdate.map(function (exdate) {
|
1824 |
+
return dateutil.timeToUntilString(exdate)
|
1825 |
+
}).join(','))
|
1826 |
+
}
|
1827 |
+
return result
|
1828 |
+
},
|
1829 |
+
|
1830 |
+
/**
|
1831 |
+
* to generate recurrence field sush as:
|
1832 |
+
* ["RRULE:FREQ=YEARLY;COUNT=2;BYDAY=TU;DTSTART=19970902T010000Z","RRULE:FREQ=YEARLY;COUNT=1;BYDAY=TH;DTSTART=19970902T010000Z"]
|
1833 |
+
*/
|
1834 |
+
toString: function () {
|
1835 |
+
return JSON.stringify(this.valueOf())
|
1836 |
+
},
|
1837 |
+
|
1838 |
+
_iter: function (iterResult) {
|
1839 |
+
var _exdateHash = {}
|
1840 |
+
var _exrule = this._exrule
|
1841 |
+
var _accept = iterResult.accept
|
1842 |
+
|
1843 |
+
function evalExdate (after, before) {
|
1844 |
+
_exrule.forEach(function (rrule) {
|
1845 |
+
rrule.between(after, before, true).forEach(function (date) {
|
1846 |
+
_exdateHash[Number(date)] = true
|
1847 |
+
})
|
1848 |
+
})
|
1849 |
+
}
|
1850 |
+
|
1851 |
+
this._exdate.forEach(function (date) {
|
1852 |
+
_exdateHash[Number(date)] = true
|
1853 |
+
})
|
1854 |
+
|
1855 |
+
iterResult.accept = function (date) {
|
1856 |
+
var dt = Number(date)
|
1857 |
+
if (!_exdateHash[dt]) {
|
1858 |
+
evalExdate(new Date(dt - 1), new Date(dt + 1))
|
1859 |
+
if (!_exdateHash[dt]) {
|
1860 |
+
_exdateHash[dt] = true
|
1861 |
+
return _accept.call(this, date)
|
1862 |
+
}
|
1863 |
+
}
|
1864 |
+
return true
|
1865 |
+
}
|
1866 |
+
|
1867 |
+
if (iterResult.method === 'between') {
|
1868 |
+
evalExdate(iterResult.args.after, iterResult.args.before)
|
1869 |
+
iterResult.accept = function (date) {
|
1870 |
+
var dt = Number(date)
|
1871 |
+
if (!_exdateHash[dt]) {
|
1872 |
+
_exdateHash[dt] = true
|
1873 |
+
return _accept.call(this, date)
|
1874 |
+
}
|
1875 |
+
return true
|
1876 |
+
}
|
1877 |
+
}
|
1878 |
+
|
1879 |
+
for (var i = 0; i < this._rdate.length; i++) {
|
1880 |
+
if (!iterResult.accept(new Date(this._rdate[i]))) break
|
1881 |
+
}
|
1882 |
+
|
1883 |
+
this._rrule.forEach(function (rrule) {
|
1884 |
+
rrule._iter(iterResult)
|
1885 |
+
})
|
1886 |
+
|
1887 |
+
var res = iterResult._result
|
1888 |
+
dateutil.sort(res)
|
1889 |
+
switch (iterResult.method) {
|
1890 |
+
case 'all':
|
1891 |
+
case 'between':
|
1892 |
+
return res
|
1893 |
+
case 'before':
|
1894 |
+
return (res.length && res[res.length - 1]) || null
|
1895 |
+
case 'after':
|
1896 |
+
return (res.length && res[0]) || null
|
1897 |
+
default:
|
1898 |
+
return null
|
1899 |
+
}
|
1900 |
+
},
|
1901 |
+
|
1902 |
+
/**
|
1903 |
+
* Create a new RRuleSet Object completely base on current instance
|
1904 |
+
*/
|
1905 |
+
clone: function () {
|
1906 |
+
var rrs = new RRuleSet(!!this._cache)
|
1907 |
+
var i
|
1908 |
+
for (i = 0; i < this._rrule.length; i++) {
|
1909 |
+
rrs.rrule(this._rrule[i].clone())
|
1910 |
+
}
|
1911 |
+
for (i = 0; i < this._rdate.length; i++) {
|
1912 |
+
rrs.rdate(new Date(this._rdate[i]))
|
1913 |
+
}
|
1914 |
+
for (i = 0; i < this._exrule.length; i++) {
|
1915 |
+
rrs.exrule(this._exrule[i].clone())
|
1916 |
+
}
|
1917 |
+
for (i = 0; i < this._exdate.length; i++) {
|
1918 |
+
rrs.exdate(new Date(this._exdate[i]))
|
1919 |
+
}
|
1920 |
+
return rrs
|
1921 |
+
}
|
1922 |
+
}
|
1923 |
+
|
1924 |
+
/**
|
1925 |
+
* Inherts method from RRule
|
1926 |
+
* add Read interface and set RRuleSet cacheable
|
1927 |
+
*/
|
1928 |
+
var RRuleSetMethods = ['all', 'between', 'before', 'after', 'count', '_cacheAdd', '_cacheGet']
|
1929 |
+
RRuleSetMethods.forEach(function (method) {
|
1930 |
+
RRuleSet.prototype[method] = RRule.prototype[method]
|
1931 |
+
})
|
1932 |
+
|
1933 |
+
/**
|
1934 |
+
* RRuleStr
|
1935 |
+
* To parse a set of rrule strings
|
1936 |
+
*/
|
1937 |
+
|
1938 |
+
var RRuleStr = function () {}
|
1939 |
+
|
1940 |
+
RRuleStr.DEFAULT_OPTIONS = {
|
1941 |
+
dtstart: null,
|
1942 |
+
cache: false,
|
1943 |
+
unfold: false,
|
1944 |
+
forceset: false,
|
1945 |
+
compatible: false,
|
1946 |
+
ignoretz: false,
|
1947 |
+
tzinfos: null
|
1948 |
+
}
|
1949 |
+
|
1950 |
+
RRuleStr._freq_map = {
|
1951 |
+
'YEARLY': RRule.YEARLY,
|
1952 |
+
'MONTHLY': RRule.MONTHLY,
|
1953 |
+
'WEEKLY': RRule.WEEKLY,
|
1954 |
+
'DAILY': RRule.DAILY,
|
1955 |
+
'HOURLY': RRule.HOURLY,
|
1956 |
+
'MINUTELY': RRule.MINUTELY,
|
1957 |
+
'SECONDLY': RRule.SECONDLY
|
1958 |
+
}
|
1959 |
+
|
1960 |
+
RRuleStr._weekday_map = {
|
1961 |
+
'MO': 0,
|
1962 |
+
'TU': 1,
|
1963 |
+
'WE': 2,
|
1964 |
+
'TH': 3,
|
1965 |
+
'FR': 4,
|
1966 |
+
'SA': 5,
|
1967 |
+
'SU': 6
|
1968 |
+
}
|
1969 |
+
|
1970 |
+
RRuleStr.prototype = {
|
1971 |
+
constructor: RRuleStr,
|
1972 |
+
|
1973 |
+
_handle_int: function (rrkwargs, name, value, options) {
|
1974 |
+
rrkwargs[name.toLowerCase()] = parseInt(value, 10)
|
1975 |
+
},
|
1976 |
+
|
1977 |
+
_handle_int_list: function (rrkwargs, name, value, options) {
|
1978 |
+
rrkwargs[name.toLowerCase()] = value.split(',').map(function (x) {
|
1979 |
+
return parseInt(x, 10)
|
1980 |
+
})
|
1981 |
+
},
|
1982 |
+
|
1983 |
+
_handle_FREQ: function (rrkwargs, name, value, options) {
|
1984 |
+
rrkwargs['freq'] = RRuleStr._freq_map[value]
|
1985 |
+
},
|
1986 |
+
|
1987 |
+
_handle_UNTIL: function (rrkwargs, name, value, options) {
|
1988 |
+
try {
|
1989 |
+
rrkwargs['until'] = dateutil.untilStringToDate(value)
|
1990 |
+
} catch (error) {
|
1991 |
+
throw new Error('invalid until date')
|
1992 |
+
}
|
1993 |
+
},
|
1994 |
+
|
1995 |
+
_handle_WKST: function (rrkwargs, name, value, options) {
|
1996 |
+
rrkwargs['wkst'] = RRuleStr._weekday_map[value]
|
1997 |
+
},
|
1998 |
+
|
1999 |
+
_handle_BYWEEKDAY: function (rrkwargs, name, value, options) {
|
2000 |
+
// Two ways to specify this: +1MO or MO(+1)
|
2001 |
+
var splt, i, j, n, w, wday
|
2002 |
+
var l = []
|
2003 |
+
var wdays = value.split(',')
|
2004 |
+
|
2005 |
+
for (i = 0; i < wdays.length; i++) {
|
2006 |
+
wday = wdays[i]
|
2007 |
+
if (wday.indexOf('(') > -1) {
|
2008 |
+
// If it's of the form TH(+1), etc.
|
2009 |
+
splt = wday.split('(')
|
2010 |
+
w = splt[0]
|
2011 |
+
n = parseInt(splt.slice(1, -1), 10)
|
2012 |
+
} else {
|
2013 |
+
// # If it's of the form +1MO
|
2014 |
+
for (j = 0; j < wday.length; j++) {
|
2015 |
+
if ('+-0123456789'.indexOf(wday[j]) === -1) break
|
2016 |
+
}
|
2017 |
+
n = wday.slice(0, j) || null
|
2018 |
+
w = wday.slice(j)
|
2019 |
+
|
2020 |
+
if (n) n = parseInt(n, 10)
|
2021 |
+
}
|
2022 |
+
|
2023 |
+
var weekday = new Weekday(RRuleStr._weekday_map[w], n)
|
2024 |
+
l.push(weekday)
|
2025 |
+
}
|
2026 |
+
rrkwargs['byweekday'] = l
|
2027 |
+
},
|
2028 |
+
|
2029 |
+
_parseRfcRRule: function (line, options) {
|
2030 |
+
options = options || {}
|
2031 |
+
options.dtstart = options.dtstart || null
|
2032 |
+
options.cache = options.cache || false
|
2033 |
+
options.ignoretz = options.ignoretz || false
|
2034 |
+
options.tzinfos = options.tzinfos || null
|
2035 |
+
|
2036 |
+
var name, value, parts
|
2037 |
+
if (line.indexOf(':') !== -1) {
|
2038 |
+
parts = line.split(':')
|
2039 |
+
name = parts[0]
|
2040 |
+
value = parts[1]
|
2041 |
+
|
2042 |
+
if (name !== 'RRULE') throw new Error('unknown parameter name')
|
2043 |
+
} else {
|
2044 |
+
value = line
|
2045 |
+
}
|
2046 |
+
|
2047 |
+
var i
|
2048 |
+
var rrkwargs = {}
|
2049 |
+
var pairs = value.split(';')
|
2050 |
+
|
2051 |
+
for (i = 0; i < pairs.length; i++) {
|
2052 |
+
parts = pairs[i].split('=')
|
2053 |
+
name = parts[0].toUpperCase()
|
2054 |
+
value = parts[1].toUpperCase()
|
2055 |
+
|
2056 |
+
try {
|
2057 |
+
this['_handle_' + name](rrkwargs, name, value, {
|
2058 |
+
ignoretz: options.ignoretz,
|
2059 |
+
tzinfos: options.tzinfos
|
2060 |
+
})
|
2061 |
+
} catch (error) {
|
2062 |
+
throw new Error("unknown parameter '" + name + "':" + value)
|
2063 |
+
}
|
2064 |
+
}
|
2065 |
+
rrkwargs.dtstart = rrkwargs.dtstart || options.dtstart
|
2066 |
+
return new RRule(rrkwargs, !options.cache)
|
2067 |
+
},
|
2068 |
+
|
2069 |
+
_parseRfc: function (s, options) {
|
2070 |
+
if (options.compatible) {
|
2071 |
+
options.forceset = true
|
2072 |
+
options.unfold = true
|
2073 |
+
}
|
2074 |
+
|
2075 |
+
s = s && s.toUpperCase().trim()
|
2076 |
+
if (!s) throw new Error('Invalid empty string')
|
2077 |
+
|
2078 |
+
var i = 0
|
2079 |
+
var line, lines
|
2080 |
+
|
2081 |
+
// More info about 'unfold' option
|
2082 |
+
// Go head to http://www.ietf.org/rfc/rfc2445.txt
|
2083 |
+
if (options.unfold) {
|
2084 |
+
lines = s.split('\n')
|
2085 |
+
while (i < lines.length) {
|
2086 |
+
// TODO
|
2087 |
+
line = lines[i] = lines[i].replace(/\s+$/g, '')
|
2088 |
+
if (!line) {
|
2089 |
+
lines.splice(i, 1)
|
2090 |
+
} else if (i > 0 && line[0] === ' ') {
|
2091 |
+
lines[i - 1] += line.slice(1)
|
2092 |
+
lines.splice(i, 1)
|
2093 |
+
} else {
|
2094 |
+
i += 1
|
2095 |
+
}
|
2096 |
+
}
|
2097 |
+
} else {
|
2098 |
+
lines = s.split(/\s/)
|
2099 |
+
}
|
2100 |
+
|
2101 |
+
var rrulevals = []
|
2102 |
+
var rdatevals = []
|
2103 |
+
var exrulevals = []
|
2104 |
+
var exdatevals = []
|
2105 |
+
var name, value, parts, parms, parm, dtstart, rset, j, k, datestrs, datestr
|
2106 |
+
|
2107 |
+
if (!options.forceset && lines.length === 1 && (s.indexOf(':') === -1 ||
|
2108 |
+
s.indexOf('RRULE:') === 0)) {
|
2109 |
+
return this._parseRfcRRule(lines[0], {
|
2110 |
+
cache: options.cache,
|
2111 |
+
dtstart: options.dtstart,
|
2112 |
+
ignoretz: options.ignoretz,
|
2113 |
+
tzinfos: options.tzinfos
|
2114 |
+
})
|
2115 |
+
} else {
|
2116 |
+
for (i = 0; i < lines.length; i++) {
|
2117 |
+
line = lines[i]
|
2118 |
+
if (!line) continue
|
2119 |
+
if (line.indexOf(':') === -1) {
|
2120 |
+
name = 'RRULE'
|
2121 |
+
value = line
|
2122 |
+
} else {
|
2123 |
+
parts = split(line, ':', 1)
|
2124 |
+
name = parts[0]
|
2125 |
+
value = parts[1]
|
2126 |
+
}
|
2127 |
+
parms = name.split(';')
|
2128 |
+
if (!parms) throw new Error('empty property name')
|
2129 |
+
name = parms[0]
|
2130 |
+
parms = parms.slice(1)
|
2131 |
+
|
2132 |
+
if (name === 'RRULE') {
|
2133 |
+
for (j = 0; j < parms.length; j++) {
|
2134 |
+
parm = parms[j]
|
2135 |
+
throw new Error('unsupported RRULE parm: ' + parm)
|
2136 |
+
}
|
2137 |
+
rrulevals.push(value)
|
2138 |
+
} else if (name === 'RDATE') {
|
2139 |
+
for (j = 0; j < parms.length; j++) {
|
2140 |
+
parm = parms[j]
|
2141 |
+
if (parm !== 'VALUE=DATE-TIME') {
|
2142 |
+
throw new Error('unsupported RDATE parm: ' + parm)
|
2143 |
+
}
|
2144 |
+
}
|
2145 |
+
rdatevals.push(value)
|
2146 |
+
} else if (name === 'EXRULE') {
|
2147 |
+
for (j = 0; j < parms.length; j++) {
|
2148 |
+
parm = parms[j]
|
2149 |
+
throw new Error('unsupported EXRULE parm: ' + parm)
|
2150 |
+
}
|
2151 |
+
exrulevals.push(value)
|
2152 |
+
} else if (name === 'EXDATE') {
|
2153 |
+
for (j = 0; j < parms.length; j++) {
|
2154 |
+
parm = parms[j]
|
2155 |
+
if (parm !== 'VALUE=DATE-TIME') {
|
2156 |
+
throw new Error('unsupported RDATE parm: ' + parm)
|
2157 |
+
}
|
2158 |
+
}
|
2159 |
+
exdatevals.push(value)
|
2160 |
+
} else if (name === 'DTSTART') {
|
2161 |
+
dtstart = dateutil.untilStringToDate(value)
|
2162 |
+
} else {
|
2163 |
+
throw new Error('unsupported property: ' + name)
|
2164 |
+
}
|
2165 |
+
}
|
2166 |
+
|
2167 |
+
if (options.forceset || rrulevals.length > 1 || rdatevals.length ||
|
2168 |
+
exrulevals.length || exdatevals.length) {
|
2169 |
+
rset = new RRuleSet(!options.cache)
|
2170 |
+
for (j = 0; j < rrulevals.length; j++) {
|
2171 |
+
rset.rrule(this._parseRfcRRule(rrulevals[j], {
|
2172 |
+
dtstart: options.dtstart || dtstart,
|
2173 |
+
ignoretz: options.ignoretz,
|
2174 |
+
tzinfos: options.tzinfos
|
2175 |
+
}))
|
2176 |
+
}
|
2177 |
+
for (j = 0; j < rdatevals.length; j++) {
|
2178 |
+
datestrs = rdatevals[j].split(',')
|
2179 |
+
for (k = 0; k < datestrs.length; k++) {
|
2180 |
+
datestr = datestrs[k]
|
2181 |
+
rset.rdate(dateutil.untilStringToDate(datestr))
|
2182 |
+
}
|
2183 |
+
}
|
2184 |
+
for (j = 0; j < exrulevals.length; j++) {
|
2185 |
+
rset.exrule(this._parseRfcRRule(exrulevals[j], {
|
2186 |
+
dtstart: options.dtstart || dtstart,
|
2187 |
+
ignoretz: options.ignoretz,
|
2188 |
+
tzinfos: options.tzinfos
|
2189 |
+
}))
|
2190 |
+
}
|
2191 |
+
for (j = 0; j < exdatevals.length; j++) {
|
2192 |
+
datestrs = exdatevals[j].split(',')
|
2193 |
+
for (k = 0; k < datestrs.length; k++) {
|
2194 |
+
datestr = datestrs[k]
|
2195 |
+
rset.exdate(dateutil.untilStringToDate(datestr))
|
2196 |
+
}
|
2197 |
+
}
|
2198 |
+
|
2199 |
+
if (options.campatiable && options.dtstart) rset.rdate(dtstart)
|
2200 |
+
return rset
|
2201 |
+
} else {
|
2202 |
+
return this._parseRfcRRule(rrulevals[0], {
|
2203 |
+
dtstart: options.dtstart || dtstart,
|
2204 |
+
cache: options.cache,
|
2205 |
+
ignoretz: options.ignoretz,
|
2206 |
+
tzinfos: options.tzinfos
|
2207 |
+
})
|
2208 |
+
}
|
2209 |
+
}
|
2210 |
+
},
|
2211 |
+
|
2212 |
+
parse: function (s, options) {
|
2213 |
+
options = options || {}
|
2214 |
+
|
2215 |
+
var invalid = []
|
2216 |
+
var keys = Object.keys(options)
|
2217 |
+
var defaultKeys = Object.keys(RRuleStr.DEFAULT_OPTIONS)
|
2218 |
+
|
2219 |
+
keys.forEach(function (key) {
|
2220 |
+
if (!contains(defaultKeys, key)) invalid.push(key)
|
2221 |
+
}, this)
|
2222 |
+
|
2223 |
+
if (invalid.length) throw new Error('Invalid options: ' + invalid.join(', '))
|
2224 |
+
|
2225 |
+
// Merge in default options
|
2226 |
+
defaultKeys.forEach(function (key) {
|
2227 |
+
if (!contains(keys, key)) options[key] = RRuleStr.DEFAULT_OPTIONS[key]
|
2228 |
+
})
|
2229 |
+
|
2230 |
+
return this._parseRfc(s, options)
|
2231 |
+
}
|
2232 |
+
}
|
2233 |
+
|
2234 |
+
RRuleStr.prototype._handle_DTSTART = function (rrkwargs, name, value, options) {
|
2235 |
+
rrkwargs[name.toLowerCase()] = dateutil.untilStringToDate(value)
|
2236 |
+
}
|
2237 |
+
|
2238 |
+
RRuleStr.prototype._handle_BYDAY = RRuleStr.prototype._handle_BYWEEKDAY
|
2239 |
+
RRuleStr.prototype._handle_INTERVAL = RRuleStr.prototype._handle_int
|
2240 |
+
RRuleStr.prototype._handle_COUNT = RRuleStr.prototype._handle_int
|
2241 |
+
|
2242 |
+
;[
|
2243 |
+
'_handle_BYSETPOS', '_handle_BYMONTH', '_handle_BYMONTHDAY',
|
2244 |
+
'_handle_BYYEARDAY', '_handle_BYEASTER', '_handle_BYWEEKNO',
|
2245 |
+
'_handle_BYHOUR', '_handle_BYMINUTE', '_handle_BYSECOND'
|
2246 |
+
].forEach(function (method) {
|
2247 |
+
RRuleStr.prototype[method] = RRuleStr.prototype._handle_int_list
|
2248 |
+
})
|
2249 |
+
|
2250 |
+
// =============================================================================
|
2251 |
+
// Export
|
2252 |
+
// =============================================================================
|
2253 |
+
|
2254 |
+
// Only one RRuleStr instance for all rrule string parsing work.
|
2255 |
+
var rruleStr = new RRuleStr()
|
2256 |
+
var rrulestr = function () {
|
2257 |
+
return rruleStr.parse.apply(rruleStr, arguments)
|
2258 |
+
}
|
2259 |
+
|
2260 |
+
RRule.RRule = RRule
|
2261 |
+
RRule.RRuleSet = RRuleSet
|
2262 |
+
RRule.rrulestr = rrulestr
|
2263 |
+
return RRule
|
2264 |
+
|
2265 |
+
function getnlp () {
|
2266 |
+
// Lazy, runtime import to avoid circular refs.
|
2267 |
+
if (!getnlp._nlp) {
|
2268 |
+
if (root && root._getRRuleNLP) {
|
2269 |
+
getnlp._nlp = root._getRRuleNLP(RRule)
|
2270 |
+
} else if (typeof require === 'function') {
|
2271 |
+
getnlp._nlp = require('./nlp')(RRule)
|
2272 |
+
} else {
|
2273 |
+
throw new Error('You need to include rrule/nlp.js for fromText/toText to work.')
|
2274 |
+
}
|
2275 |
+
}
|
2276 |
+
return getnlp._nlp
|
2277 |
+
}
|
2278 |
+
}))
|
DC_MultiViewCal/src/Plugins/underscore.js
ADDED
@@ -0,0 +1,1061 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
// Underscore.js 1.3.3
|
2 |
+
// (c) 2009-2012 Jeremy Ashkenas, DocumentCloud Inc.
|
3 |
+
// Underscore is freely distributable under the MIT license.
|
4 |
+
// Portions of Underscore are inspired or borrowed from Prototype,
|
5 |
+
// Oliver Steele's Functional, and John Resig's Micro-Templating.
|
6 |
+
// For all details and documentation:
|
7 |
+
// http://documentcloud.github.com/underscore
|
8 |
+
|
9 |
+
(function() {
|
10 |
+
|
11 |
+
// Baseline setup
|
12 |
+
// --------------
|
13 |
+
|
14 |
+
// Establish the root object, `window` in the browser, or `global` on the server.
|
15 |
+
var root = this;
|
16 |
+
|
17 |
+
// Save the previous value of the `_` variable.
|
18 |
+
var previousUnderscore = root._;
|
19 |
+
|
20 |
+
// Establish the object that gets returned to break out of a loop iteration.
|
21 |
+
var breaker = {};
|
22 |
+
|
23 |
+
// Save bytes in the minified (but not gzipped) version:
|
24 |
+
var ArrayProto = Array.prototype, ObjProto = Object.prototype, FuncProto = Function.prototype;
|
25 |
+
|
26 |
+
// Create quick reference variables for speed access to core prototypes.
|
27 |
+
var slice = ArrayProto.slice,
|
28 |
+
unshift = ArrayProto.unshift,
|
29 |
+
toString = ObjProto.toString,
|
30 |
+
hasOwnProperty = ObjProto.hasOwnProperty;
|
31 |
+
|
32 |
+
// All **ECMAScript 5** native function implementations that we hope to use
|
33 |
+
// are declared here.
|
34 |
+
var
|
35 |
+
nativeForEach = ArrayProto.forEach,
|
36 |
+
nativeMap = ArrayProto.map,
|
37 |
+
nativeReduce = ArrayProto.reduce,
|
38 |
+
nativeReduceRight = ArrayProto.reduceRight,
|
39 |
+
nativeFilter = ArrayProto.filter,
|
40 |
+
nativeEvery = ArrayProto.every,
|
41 |
+
nativeSome = ArrayProto.some,
|
42 |
+
nativeIndexOf = ArrayProto.indexOf,
|
43 |
+
nativeLastIndexOf = ArrayProto.lastIndexOf,
|
44 |
+
nativeIsArray = Array.isArray,
|
45 |
+
nativeKeys = Object.keys,
|
46 |
+
nativeBind = FuncProto.bind;
|
47 |
+
|
48 |
+
// Create a safe reference to the Underscore object for use below.
|
49 |
+
var _ = function(obj) { return new wrapper(obj); };
|
50 |
+
|
51 |
+
// Export the Underscore object for **Node.js**, with
|
52 |
+
// backwards-compatibility for the old `require()` API. If we're in
|
53 |
+
// the browser, add `_` as a global object via a string identifier,
|
54 |
+
// for Closure Compiler "advanced" mode.
|
55 |
+
if (typeof exports !== 'undefined') {
|
56 |
+
if (typeof module !== 'undefined' && module.exports) {
|
57 |
+
exports = module.exports = _;
|
58 |
+
}
|
59 |
+
exports._ = _;
|
60 |
+
} else {
|
61 |
+
root['_'] = _;
|
62 |
+
}
|
63 |
+
|
64 |
+
// Current version.
|
65 |
+
_.VERSION = '1.3.3';
|
66 |
+
|
67 |
+
// Collection Functions
|
68 |
+
// --------------------
|
69 |
+
|
70 |
+
// The cornerstone, an `each` implementation, aka `forEach`.
|
71 |
+
// Handles objects with the built-in `forEach`, arrays, and raw objects.
|
72 |
+
// Delegates to **ECMAScript 5**'s native `forEach` if available.
|
73 |
+
var each = _.each = _.forEach = function(obj, iterator, context) {
|
74 |
+
if (obj == null) return;
|
75 |
+
if (nativeForEach && obj.forEach === nativeForEach) {
|
76 |
+
obj.forEach(iterator, context);
|
77 |
+
} else if (obj.length === +obj.length) {
|
78 |
+
for (var i = 0, l = obj.length; i < l; i++) {
|
79 |
+
if (i in obj && iterator.call(context, obj[i], i, obj) === breaker) return;
|
80 |
+
}
|
81 |
+
} else {
|
82 |
+
for (var key in obj) {
|
83 |
+
if (_.has(obj, key)) {
|
84 |
+
if (iterator.call(context, obj[key], key, obj) === breaker) return;
|
85 |
+
}
|
86 |
+
}
|
87 |
+
}
|
88 |
+
};
|
89 |
+
|
90 |
+
// Return the results of applying the iterator to each element.
|
91 |
+
// Delegates to **ECMAScript 5**'s native `map` if available.
|
92 |
+
_.map = _.collect = function(obj, iterator, context) {
|
93 |
+
var results = [];
|
94 |
+
if (obj == null) return results;
|
95 |
+
if (nativeMap && obj.map === nativeMap) return obj.map(iterator, context);
|
96 |
+
each(obj, function(value, index, list) {
|
97 |
+
results[results.length] = iterator.call(context, value, index, list);
|
98 |
+
});
|
99 |
+
if (obj.length === +obj.length) results.length = obj.length;
|
100 |
+
return results;
|
101 |
+
};
|
102 |
+
|
103 |
+
// **Reduce** builds up a single result from a list of values, aka `inject`,
|
104 |
+
// or `foldl`. Delegates to **ECMAScript 5**'s native `reduce` if available.
|
105 |
+
_.reduce = _.foldl = _.inject = function(obj, iterator, memo, context) {
|
106 |
+
var initial = arguments.length > 2;
|
107 |
+
if (obj == null) obj = [];
|
108 |
+
if (nativeReduce && obj.reduce === nativeReduce) {
|
109 |
+
if (context) iterator = _.bind(iterator, context);
|
110 |
+
return initial ? obj.reduce(iterator, memo) : obj.reduce(iterator);
|
111 |
+
}
|
112 |
+
each(obj, function(value, index, list) {
|
113 |
+
if (!initial) {
|
114 |
+
memo = value;
|
115 |
+
initial = true;
|
116 |
+
} else {
|
117 |
+
memo = iterator.call(context, memo, value, index, list);
|
118 |
+
}
|
119 |
+
});
|
120 |
+
if (!initial) throw new TypeError('Reduce of empty array with no initial value');
|
121 |
+
return memo;
|
122 |
+
};
|
123 |
+
|
124 |
+
// The right-associative version of reduce, also known as `foldr`.
|
125 |
+
// Delegates to **ECMAScript 5**'s native `reduceRight` if available.
|
126 |
+
_.reduceRight = _.foldr = function(obj, iterator, memo, context) {
|
127 |
+
var initial = arguments.length > 2;
|
128 |
+
if (obj == null) obj = [];
|
129 |
+
if (nativeReduceRight && obj.reduceRight === nativeReduceRight) {
|
130 |
+
if (context) iterator = _.bind(iterator, context);
|
131 |
+
return initial ? obj.reduceRight(iterator, memo) : obj.reduceRight(iterator);
|
132 |
+
}
|
133 |
+
var reversed = _.toArray(obj).reverse();
|
134 |
+
if (context && !initial) iterator = _.bind(iterator, context);
|
135 |
+
return initial ? _.reduce(reversed, iterator, memo, context) : _.reduce(reversed, iterator);
|
136 |
+
};
|
137 |
+
|
138 |
+
// Return the first value which passes a truth test. Aliased as `detect`.
|
139 |
+
_.find = _.detect = function(obj, iterator, context) {
|
140 |
+
var result;
|
141 |
+
any(obj, function(value, index, list) {
|
142 |
+
if (iterator.call(context, value, index, list)) {
|
143 |
+
result = value;
|
144 |
+
return true;
|
145 |
+
}
|
146 |
+
});
|
147 |
+
return result;
|
148 |
+
};
|
149 |
+
|
150 |
+
// Return all the elements that pass a truth test.
|
151 |
+
// Delegates to **ECMAScript 5**'s native `filter` if available.
|
152 |
+
// Aliased as `select`.
|
153 |
+
_.filter = _.select = function(obj, iterator, context) {
|
154 |
+
var results = [];
|
155 |
+
if (obj == null) return results;
|
156 |
+
if (nativeFilter && obj.filter === nativeFilter) return obj.filter(iterator, context);
|
157 |
+
each(obj, function(value, index, list) {
|
158 |
+
if (iterator.call(context, value, index, list)) results[results.length] = value;
|
159 |
+
});
|
160 |
+
return results;
|
161 |
+
};
|
162 |
+
|
163 |
+
// Return all the elements for which a truth test fails.
|
164 |
+
_.reject = function(obj, iterator, context) {
|
165 |
+
var results = [];
|
166 |
+
if (obj == null) return results;
|
167 |
+
each(obj, function(value, index, list) {
|
168 |
+
if (!iterator.call(context, value, index, list)) results[results.length] = value;
|
169 |
+
});
|
170 |
+
return results;
|
171 |
+
};
|
172 |
+
|
173 |
+
// Determine whether all of the elements match a truth test.
|
174 |
+
// Delegates to **ECMAScript 5**'s native `every` if available.
|
175 |
+
// Aliased as `all`.
|
176 |
+
_.every = _.all = function(obj, iterator, context) {
|
177 |
+
var result = true;
|
178 |
+
if (obj == null) return result;
|
179 |
+
if (nativeEvery && obj.every === nativeEvery) return obj.every(iterator, context);
|
180 |
+
each(obj, function(value, index, list) {
|
181 |
+
if (!(result = result && iterator.call(context, value, index, list))) return breaker;
|
182 |
+
});
|
183 |
+
return !!result;
|
184 |
+
};
|
185 |
+
|
186 |
+
// Determine if at least one element in the object matches a truth test.
|
187 |
+
// Delegates to **ECMAScript 5**'s native `some` if available.
|
188 |
+
// Aliased as `any`.
|
189 |
+
var any = _.some = _.any = function(obj, iterator, context) {
|
190 |
+
iterator || (iterator = _.identity);
|
191 |
+
var result = false;
|
192 |
+
if (obj == null) return result;
|
193 |
+
if (nativeSome && obj.some === nativeSome) return obj.some(iterator, context);
|
194 |
+
each(obj, function(value, index, list) {
|
195 |
+
if (result || (result = iterator.call(context, value, index, list))) return breaker;
|
196 |
+
});
|
197 |
+
return !!result;
|
198 |
+
};
|
199 |
+
|
200 |
+
// Determine if a given value is included in the array or object using `===`.
|
201 |
+
// Aliased as `contains`.
|
202 |
+
_.include = _.contains = function(obj, target) {
|
203 |
+
var found = false;
|
204 |
+
if (obj == null) return found;
|
205 |
+
if (nativeIndexOf && obj.indexOf === nativeIndexOf) return obj.indexOf(target) != -1;
|
206 |
+
found = any(obj, function(value) {
|
207 |
+
return value === target;
|
208 |
+
});
|
209 |
+
return found;
|
210 |
+
};
|
211 |
+
|
212 |
+
// Invoke a method (with arguments) on every item in a collection.
|
213 |
+
_.invoke = function(obj, method) {
|
214 |
+
var args = slice.call(arguments, 2);
|
215 |
+
return _.map(obj, function(value) {
|
216 |
+
return (_.isFunction(method) ? method || value : value[method]).apply(value, args);
|
217 |
+
});
|
218 |
+
};
|
219 |
+
|
220 |
+
// Convenience version of a common use case of `map`: fetching a property.
|
221 |
+
_.pluck = function(obj, key) {
|
222 |
+
return _.map(obj, function(value){ return value[key]; });
|
223 |
+
};
|
224 |
+
|
225 |
+
// Return the maximum element or (element-based computation).
|
226 |
+
_.max = function(obj, iterator, context) {
|
227 |
+
if (!iterator && _.isArray(obj) && obj[0] === +obj[0]) return Math.max.apply(Math, obj);
|
228 |
+
if (!iterator && _.isEmpty(obj)) return -Infinity;
|
229 |
+
var result = {computed : -Infinity};
|
230 |
+
each(obj, function(value, index, list) {
|
231 |
+
var computed = iterator ? iterator.call(context, value, index, list) : value;
|
232 |
+
computed >= result.computed && (result = {value : value, computed : computed});
|
233 |
+
});
|
234 |
+
return result.value;
|
235 |
+
};
|
236 |
+
|
237 |
+
// Return the minimum element (or element-based computation).
|
238 |
+
_.min = function(obj, iterator, context) {
|
239 |
+
if (!iterator && _.isArray(obj) && obj[0] === +obj[0]) return Math.min.apply(Math, obj);
|
240 |
+
if (!iterator && _.isEmpty(obj)) return Infinity;
|
241 |
+
var result = {computed : Infinity};
|
242 |
+
each(obj, function(value, index, list) {
|
243 |
+
var computed = iterator ? iterator.call(context, value, index, list) : value;
|
244 |
+
computed < result.computed && (result = {value : value, computed : computed});
|
245 |
+
});
|
246 |
+
return result.value;
|
247 |
+
};
|
248 |
+
|
249 |
+
// Shuffle an array.
|
250 |
+
_.shuffle = function(obj) {
|
251 |
+
var shuffled = [], rand;
|
252 |
+
each(obj, function(value, index, list) {
|
253 |
+
rand = Math.floor(Math.random() * (index + 1));
|
254 |
+
shuffled[index] = shuffled[rand];
|
255 |
+
shuffled[rand] = value;
|
256 |
+
});
|
257 |
+
return shuffled;
|
258 |
+
};
|
259 |
+
|
260 |
+
// Sort the object's values by a criterion produced by an iterator.
|
261 |
+
_.sortBy = function(obj, val, context) {
|
262 |
+
var iterator = _.isFunction(val) ? val : function(obj) { return obj[val]; };
|
263 |
+
return _.pluck(_.map(obj, function(value, index, list) {
|
264 |
+
return {
|
265 |
+
value : value,
|
266 |
+
criteria : iterator.call(context, value, index, list)
|
267 |
+
};
|
268 |
+
}).sort(function(left, right) {
|
269 |
+
var a = left.criteria, b = right.criteria;
|
270 |
+
if (a === void 0) return 1;
|
271 |
+
if (b === void 0) return -1;
|
272 |
+
return a < b ? -1 : a > b ? 1 : 0;
|
273 |
+
}), 'value');
|
274 |
+
};
|
275 |
+
|
276 |
+
// Groups the object's values by a criterion. Pass either a string attribute
|
277 |
+
// to group by, or a function that returns the criterion.
|
278 |
+
_.groupBy = function(obj, val) {
|
279 |
+
var result = {};
|
280 |
+
var iterator = _.isFunction(val) ? val : function(obj) { return obj[val]; };
|
281 |
+
each(obj, function(value, index) {
|
282 |
+
var key = iterator(value, index);
|
283 |
+
(result[key] || (result[key] = [])).push(value);
|
284 |
+
});
|
285 |
+
return result;
|
286 |
+
};
|
287 |
+
|
288 |
+
// Use a comparator function to figure out at what index an object should
|
289 |
+
// be inserted so as to maintain order. Uses binary search.
|
290 |
+
_.sortedIndex = function(array, obj, iterator) {
|
291 |
+
iterator || (iterator = _.identity);
|
292 |
+
var low = 0, high = array.length;
|
293 |
+
while (low < high) {
|
294 |
+
var mid = (low + high) >> 1;
|
295 |
+
iterator(array[mid]) < iterator(obj) ? low = mid + 1 : high = mid;
|
296 |
+
}
|
297 |
+
return low;
|
298 |
+
};
|
299 |
+
|
300 |
+
// Safely convert anything iterable into a real, live array.
|
301 |
+
_.toArray = function(obj) {
|
302 |
+
if (!obj) return [];
|
303 |
+
if (_.isArray(obj)) return slice.call(obj);
|
304 |
+
if (_.isArguments(obj)) return slice.call(obj);
|
305 |
+
if (obj.toArray && _.isFunction(obj.toArray)) return obj.toArray();
|
306 |
+
return _.values(obj);
|
307 |
+
};
|
308 |
+
|
309 |
+
// Return the number of elements in an object.
|
310 |
+
_.size = function(obj) {
|
311 |
+
try{
|
312 |
+
return _.isArray(obj) ? obj.length : _.keys(obj).length;
|
313 |
+
}catch (e) {}
|
314 |
+
};
|
315 |
+
|
316 |
+
// Array Functions
|
317 |
+
// ---------------
|
318 |
+
|
319 |
+
// Get the first element of an array. Passing **n** will return the first N
|
320 |
+
// values in the array. Aliased as `head` and `take`. The **guard** check
|
321 |
+
// allows it to work with `_.map`.
|
322 |
+
_.first = _.head = _.take = function(array, n, guard) {
|
323 |
+
return (n != null) && !guard ? slice.call(array, 0, n) : array[0];
|
324 |
+
};
|
325 |
+
|
326 |
+
// Returns everything but the last entry of the array. Especcialy useful on
|
327 |
+
// the arguments object. Passing **n** will return all the values in
|
328 |
+
// the array, excluding the last N. The **guard** check allows it to work with
|
329 |
+
// `_.map`.
|
330 |
+
_.initial = function(array, n, guard) {
|
331 |
+
return slice.call(array, 0, array.length - ((n == null) || guard ? 1 : n));
|
332 |
+
};
|
333 |
+
|
334 |
+
// Get the last element of an array. Passing **n** will return the last N
|
335 |
+
// values in the array. The **guard** check allows it to work with `_.map`.
|
336 |
+
_.last = function(array, n, guard) {
|
337 |
+
if ((n != null) && !guard) {
|
338 |
+
return slice.call(array, Math.max(array.length - n, 0));
|
339 |
+
} else {
|
340 |
+
return array[array.length - 1];
|
341 |
+
}
|
342 |
+
};
|
343 |
+
|
344 |
+
// Returns everything but the first entry of the array. Aliased as `tail`.
|
345 |
+
// Especially useful on the arguments object. Passing an **index** will return
|
346 |
+
// the rest of the values in the array from that index onward. The **guard**
|
347 |
+
// check allows it to work with `_.map`.
|
348 |
+
_.rest = _.tail = function(array, index, guard) {
|
349 |
+
return slice.call(array, (index == null) || guard ? 1 : index);
|
350 |
+
};
|
351 |
+
|
352 |
+
// Trim out all falsy values from an array.
|
353 |
+
_.compact = function(array) {
|
354 |
+
return _.filter(array, function(value){ return !!value; });
|
355 |
+
};
|
356 |
+
|
357 |
+
// Return a completely flattened version of an array.
|
358 |
+
_.flatten = function(array, shallow) {
|
359 |
+
return _.reduce(array, function(memo, value) {
|
360 |
+
if (_.isArray(value)) return memo.concat(shallow ? value : _.flatten(value));
|
361 |
+
memo[memo.length] = value;
|
362 |
+
return memo;
|
363 |
+
}, []);
|
364 |
+
};
|
365 |
+
|
366 |
+
// Return a version of the array that does not contain the specified value(s).
|
367 |
+
_.without = function(array) {
|
368 |
+
return _.difference(array, slice.call(arguments, 1));
|
369 |
+
};
|
370 |
+
|
371 |
+
// Produce a duplicate-free version of the array. If the array has already
|
372 |
+
// been sorted, you have the option of using a faster algorithm.
|
373 |
+
// Aliased as `unique`.
|
374 |
+
_.uniq = _.unique = function(array, isSorted, iterator) {
|
375 |
+
var initial = iterator ? _.map(array, iterator) : array;
|
376 |
+
var results = [];
|
377 |
+
// The `isSorted` flag is irrelevant if the array only contains two elements.
|
378 |
+
if (array.length < 3) isSorted = true;
|
379 |
+
_.reduce(initial, function (memo, value, index) {
|
380 |
+
if (isSorted ? _.last(memo) !== value || !memo.length : !_.include(memo, value)) {
|
381 |
+
memo.push(value);
|
382 |
+
results.push(array[index]);
|
383 |
+
}
|
384 |
+
return memo;
|
385 |
+
}, []);
|
386 |
+
return results;
|
387 |
+
};
|
388 |
+
|
389 |
+
// Produce an array that contains the union: each distinct element from all of
|
390 |
+
// the passed-in arrays.
|
391 |
+
_.union = function() {
|
392 |
+
return _.uniq(_.flatten(arguments, true));
|
393 |
+
};
|
394 |
+
|
395 |
+
// Produce an array that contains every item shared between all the
|
396 |
+
// passed-in arrays. (Aliased as "intersect" for back-compat.)
|
397 |
+
_.intersection = _.intersect = function(array) {
|
398 |
+
var rest = slice.call(arguments, 1);
|
399 |
+
return _.filter(_.uniq(array), function(item) {
|
400 |
+
return _.every(rest, function(other) {
|
401 |
+
return _.indexOf(other, item) >= 0;
|
402 |
+
});
|
403 |
+
});
|
404 |
+
};
|
405 |
+
|
406 |
+
// Take the difference between one array and a number of other arrays.
|
407 |
+
// Only the elements present in just the first array will remain.
|
408 |
+
_.difference = function(array) {
|
409 |
+
var rest = _.flatten(slice.call(arguments, 1), true);
|
410 |
+
return _.filter(array, function(value){ return !_.include(rest, value); });
|
411 |
+
};
|
412 |
+
|
413 |
+
// Zip together multiple lists into a single array -- elements that share
|
414 |
+
// an index go together.
|
415 |
+
_.zip = function() {
|
416 |
+
var args = slice.call(arguments);
|
417 |
+
var length = _.max(_.pluck(args, 'length'));
|
418 |
+
var results = new Array(length);
|
419 |
+
for (var i = 0; i < length; i++) results[i] = _.pluck(args, "" + i);
|
420 |
+
return results;
|
421 |
+
};
|
422 |
+
|
423 |
+
// If the browser doesn't supply us with indexOf (I'm looking at you, **MSIE**),
|
424 |
+
// we need this function. Return the position of the first occurrence of an
|
425 |
+
// item in an array, or -1 if the item is not included in the array.
|
426 |
+
// Delegates to **ECMAScript 5**'s native `indexOf` if available.
|
427 |
+
// If the array is large and already in sort order, pass `true`
|
428 |
+
// for **isSorted** to use binary search.
|
429 |
+
_.indexOf = function(array, item, isSorted) {
|
430 |
+
if (array == null) return -1;
|
431 |
+
var i, l;
|
432 |
+
if (isSorted) {
|
433 |
+
i = _.sortedIndex(array, item);
|
434 |
+
return array[i] === item ? i : -1;
|
435 |
+
}
|
436 |
+
if (nativeIndexOf && array.indexOf === nativeIndexOf) return array.indexOf(item);
|
437 |
+
for (i = 0, l = array.length; i < l; i++) if (i in array && array[i] === item) return i;
|
438 |
+
return -1;
|
439 |
+
};
|
440 |
+
|
441 |
+
// Delegates to **ECMAScript 5**'s native `lastIndexOf` if available.
|
442 |
+
_.lastIndexOf = function(array, item) {
|
443 |
+
if (array == null) return -1;
|
444 |
+
if (nativeLastIndexOf && array.lastIndexOf === nativeLastIndexOf) return array.lastIndexOf(item);
|
445 |
+
var i = array.length;
|
446 |
+
while (i--) if (i in array && array[i] === item) return i;
|
447 |
+
return -1;
|
448 |
+
};
|
449 |
+
|
450 |
+
// Generate an integer Array containing an arithmetic progression. A port of
|
451 |
+
// the native Python `range()` function. See
|
452 |
+
// [the Python documentation](http://docs.python.org/library/functions.html#range).
|
453 |
+
_.range = function(start, stop, step) {
|
454 |
+
if (arguments.length <= 1) {
|
455 |
+
stop = start || 0;
|
456 |
+
start = 0;
|
457 |
+
}
|
458 |
+
step = arguments[2] || 1;
|
459 |
+
|
460 |
+
var len = Math.max(Math.ceil((stop - start) / step), 0);
|
461 |
+
var idx = 0;
|
462 |
+
var range = new Array(len);
|
463 |
+
|
464 |
+
while(idx < len) {
|
465 |
+
range[idx++] = start;
|
466 |
+
start += step;
|
467 |
+
}
|
468 |
+
|
469 |
+
return range;
|
470 |
+
};
|
471 |
+
|
472 |
+
// Function (ahem) Functions
|
473 |
+
// ------------------
|
474 |
+
|
475 |
+
// Reusable constructor function for prototype setting.
|
476 |
+
var ctor = function(){};
|
477 |
+
|
478 |
+
// Create a function bound to a given object (assigning `this`, and arguments,
|
479 |
+
// optionally). Binding with arguments is also known as `curry`.
|
480 |
+
// Delegates to **ECMAScript 5**'s native `Function.bind` if available.
|
481 |
+
// We check for `func.bind` first, to fail fast when `func` is undefined.
|
482 |
+
_.bind = function bind(func, context) {
|
483 |
+
var bound, args;
|
484 |
+
if (func.bind === nativeBind && nativeBind) return nativeBind.apply(func, slice.call(arguments, 1));
|
485 |
+
if (!_.isFunction(func)) throw new TypeError;
|
486 |
+
args = slice.call(arguments, 2);
|
487 |
+
return bound = function() {
|
488 |
+
if (!(this instanceof bound)) return func.apply(context, args.concat(slice.call(arguments)));
|
489 |
+
ctor.prototype = func.prototype;
|
490 |
+
var self = new ctor;
|
491 |
+
var result = func.apply(self, args.concat(slice.call(arguments)));
|
492 |
+
if (Object(result) === result) return result;
|
493 |
+
return self;
|
494 |
+
};
|
495 |
+
};
|
496 |
+
|
497 |
+
// Bind all of an object's methods to that object. Useful for ensuring that
|
498 |
+
// all callbacks defined on an object belong to it.
|
499 |
+
_.bindAll = function(obj) {
|
500 |
+
var funcs = slice.call(arguments, 1);
|
501 |
+
if (funcs.length == 0) funcs = _.functions(obj);
|
502 |
+
each(funcs, function(f) { obj[f] = _.bind(obj[f], obj); });
|
503 |
+
return obj;
|
504 |
+
};
|
505 |
+
|
506 |
+
// Memoize an expensive function by storing its results.
|
507 |
+
_.memoize = function(func, hasher) {
|
508 |
+
var memo = {};
|
509 |
+
hasher || (hasher = _.identity);
|
510 |
+
return function() {
|
511 |
+
var key = hasher.apply(this, arguments);
|
512 |
+
return _.has(memo, key) ? memo[key] : (memo[key] = func.apply(this, arguments));
|
513 |
+
};
|
514 |
+
};
|
515 |
+
|
516 |
+
// Delays a function for the given number of milliseconds, and then calls
|
517 |
+
// it with the arguments supplied.
|
518 |
+
_.delay = function(func, wait) {
|
519 |
+
var args = slice.call(arguments, 2);
|
520 |
+
return setTimeout(function(){ return func.apply(null, args); }, wait);
|
521 |
+
};
|
522 |
+
|
523 |
+
// Defers a function, scheduling it to run after the current call stack has
|
524 |
+
// cleared.
|
525 |
+
_.defer = function(func) {
|
526 |
+
return _.delay.apply(_, [func, 1].concat(slice.call(arguments, 1)));
|
527 |
+
};
|
528 |
+
|
529 |
+
// Returns a function, that, when invoked, will only be triggered at most once
|
530 |
+
// during a given window of time.
|
531 |
+
_.throttle = function(func, wait) {
|
532 |
+
var context, args, timeout, throttling, more, result;
|
533 |
+
var whenDone = _.debounce(function(){ more = throttling = false; }, wait);
|
534 |
+
return function() {
|
535 |
+
context = this; args = arguments;
|
536 |
+
var later = function() {
|
537 |
+
timeout = null;
|
538 |
+
if (more) func.apply(context, args);
|
539 |
+
whenDone();
|
540 |
+
};
|
541 |
+
if (!timeout) timeout = setTimeout(later, wait);
|
542 |
+
if (throttling) {
|
543 |
+
more = true;
|
544 |
+
} else {
|
545 |
+
result = func.apply(context, args);
|
546 |
+
}
|
547 |
+
whenDone();
|
548 |
+
throttling = true;
|
549 |
+
return result;
|
550 |
+
};
|
551 |
+
};
|
552 |
+
|
553 |
+
// Returns a function, that, as long as it continues to be invoked, will not
|
554 |
+
// be triggered. The function will be called after it stops being called for
|
555 |
+
// N milliseconds. If `immediate` is passed, trigger the function on the
|
556 |
+
// leading edge, instead of the trailing.
|
557 |
+
_.debounce = function(func, wait, immediate) {
|
558 |
+
var timeout;
|
559 |
+
return function() {
|
560 |
+
var context = this, args = arguments;
|
561 |
+
var later = function() {
|
562 |
+
timeout = null;
|
563 |
+
if (!immediate) func.apply(context, args);
|
564 |
+
};
|
565 |
+
if (immediate && !timeout) func.apply(context, args);
|
566 |
+
clearTimeout(timeout);
|
567 |
+
timeout = setTimeout(later, wait);
|
568 |
+
};
|
569 |
+
};
|
570 |
+
|
571 |
+
// Returns a function that will be executed at most one time, no matter how
|
572 |
+
// often you call it. Useful for lazy initialization.
|
573 |
+
_.once = function(func) {
|
574 |
+
var ran = false, memo;
|
575 |
+
return function() {
|
576 |
+
if (ran) return memo;
|
577 |
+
ran = true;
|
578 |
+
return memo = func.apply(this, arguments);
|
579 |
+
};
|
580 |
+
};
|
581 |
+
|
582 |
+
// Returns the first function passed as an argument to the second,
|
583 |
+
// allowing you to adjust arguments, run code before and after, and
|
584 |
+
// conditionally execute the original function.
|
585 |
+
_.wrap = function(func, wrapper) {
|
586 |
+
return function() {
|
587 |
+
var args = [func].concat(slice.call(arguments, 0));
|
588 |
+
return wrapper.apply(this, args);
|
589 |
+
};
|
590 |
+
};
|
591 |
+
|
592 |
+
// Returns a function that is the composition of a list of functions, each
|
593 |
+
// consuming the return value of the function that follows.
|
594 |
+
_.compose = function() {
|
595 |
+
var funcs = arguments;
|
596 |
+
return function() {
|
597 |
+
var args = arguments;
|
598 |
+
for (var i = funcs.length - 1; i >= 0; i--) {
|
599 |
+
args = [funcs[i].apply(this, args)];
|
600 |
+
}
|
601 |
+
return args[0];
|
602 |
+
};
|
603 |
+
};
|
604 |
+
|
605 |
+
// Returns a function that will only be executed after being called N times.
|
606 |
+
_.after = function(times, func) {
|
607 |
+
if (times <= 0) return func();
|
608 |
+
return function() {
|
609 |
+
if (--times < 1) { return func.apply(this, arguments); }
|
610 |
+
};
|
611 |
+
};
|
612 |
+
|
613 |
+
// Object Functions
|
614 |
+
// ----------------
|
615 |
+
|
616 |
+
// Retrieve the names of an object's properties.
|
617 |
+
// Delegates to **ECMAScript 5**'s native `Object.keys`
|
618 |
+
_.keys = nativeKeys || function(obj) {
|
619 |
+
if (obj !== Object(obj)) throw new TypeError('Invalid object');
|
620 |
+
var keys = [];
|
621 |
+
for (var key in obj) if (_.has(obj, key)) keys[keys.length] = key;
|
622 |
+
return keys;
|
623 |
+
};
|
624 |
+
|
625 |
+
// Retrieve the values of an object's properties.
|
626 |
+
_.values = function(obj) {
|
627 |
+
return _.map(obj, _.identity);
|
628 |
+
};
|
629 |
+
|
630 |
+
// Return a sorted list of the function names available on the object.
|
631 |
+
// Aliased as `methods`
|
632 |
+
_.functions = _.methods = function(obj) {
|
633 |
+
var names = [];
|
634 |
+
for (var key in obj) {
|
635 |
+
if (_.isFunction(obj[key])) names.push(key);
|
636 |
+
}
|
637 |
+
return names.sort();
|
638 |
+
};
|
639 |
+
|
640 |
+
// Extend a given object with all the properties in passed-in object(s).
|
641 |
+
_.extend = function(obj) {
|
642 |
+
each(slice.call(arguments, 1), function(source) {
|
643 |
+
for (var prop in source) {
|
644 |
+
obj[prop] = source[prop];
|
645 |
+
}
|
646 |
+
});
|
647 |
+
return obj;
|
648 |
+
};
|
649 |
+
|
650 |
+
// Return a copy of the object only containing the whitelisted properties.
|
651 |
+
_.pick = function(obj) {
|
652 |
+
var result = {};
|
653 |
+
each(_.flatten(slice.call(arguments, 1)), function(key) {
|
654 |
+
if (key in obj) result[key] = obj[key];
|
655 |
+
});
|
656 |
+
return result;
|
657 |
+
};
|
658 |
+
|
659 |
+
// Fill in a given object with default properties.
|
660 |
+
_.defaults = function(obj) {
|
661 |
+
each(slice.call(arguments, 1), function(source) {
|
662 |
+
for (var prop in source) {
|
663 |
+
if (obj[prop] == null) obj[prop] = source[prop];
|
664 |
+
}
|
665 |
+
});
|
666 |
+
return obj;
|
667 |
+
};
|
668 |
+
|
669 |
+
// Create a (shallow-cloned) duplicate of an object.
|
670 |
+
_.clone = function(obj) {
|
671 |
+
if (!_.isObject(obj)) return obj;
|
672 |
+
return _.isArray(obj) ? obj.slice() : _.extend({}, obj);
|
673 |
+
};
|
674 |
+
|
675 |
+
// Invokes interceptor with the obj, and then returns obj.
|
676 |
+
// The primary purpose of this method is to "tap into" a method chain, in
|
677 |
+
// order to perform operations on intermediate results within the chain.
|
678 |
+
_.tap = function(obj, interceptor) {
|
679 |
+
interceptor(obj);
|
680 |
+
return obj;
|
681 |
+
};
|
682 |
+
|
683 |
+
// Internal recursive comparison function.
|
684 |
+
function eq(a, b, stack) {
|
685 |
+
// Identical objects are equal. `0 === -0`, but they aren't identical.
|
686 |
+
// See the Harmony `egal` proposal: http://wiki.ecmascript.org/doku.php?id=harmony:egal.
|
687 |
+
if (a === b) return a !== 0 || 1 / a == 1 / b;
|
688 |
+
// A strict comparison is necessary because `null == undefined`.
|
689 |
+
if (a == null || b == null) return a === b;
|
690 |
+
// Unwrap any wrapped objects.
|
691 |
+
if (a._chain) a = a._wrapped;
|
692 |
+
if (b._chain) b = b._wrapped;
|
693 |
+
// Invoke a custom `isEqual` method if one is provided.
|
694 |
+
if (a.isEqual && _.isFunction(a.isEqual)) return a.isEqual(b);
|
695 |
+
if (b.isEqual && _.isFunction(b.isEqual)) return b.isEqual(a);
|
696 |
+
// Compare `[[Class]]` names.
|
697 |
+
var className = toString.call(a);
|
698 |
+
if (className != toString.call(b)) return false;
|
699 |
+
switch (className) {
|
700 |
+
// Strings, numbers, dates, and booleans are compared by value.
|
701 |
+
case '[object String]':
|
702 |
+
// Primitives and their corresponding object wrappers are equivalent; thus, `"5"` is
|
703 |
+
// equivalent to `new String("5")`.
|
704 |
+
return a == String(b);
|
705 |
+
case '[object Number]':
|
706 |
+
// `NaN`s are equivalent, but non-reflexive. An `egal` comparison is performed for
|
707 |
+
// other numeric values.
|
708 |
+
return a != +a ? b != +b : (a == 0 ? 1 / a == 1 / b : a == +b);
|
709 |
+
case '[object Date]':
|
710 |
+
case '[object Boolean]':
|
711 |
+
// Coerce dates and booleans to numeric primitive values. Dates are compared by their
|
712 |
+
// millisecond representations. Note that invalid dates with millisecond representations
|
713 |
+
// of `NaN` are not equivalent.
|
714 |
+
return +a == +b;
|
715 |
+
// RegExps are compared by their source patterns and flags.
|
716 |
+
case '[object RegExp]':
|
717 |
+
return a.source == b.source &&
|
718 |
+
a.global == b.global &&
|
719 |
+
a.multiline == b.multiline &&
|
720 |
+
a.ignoreCase == b.ignoreCase;
|
721 |
+
}
|
722 |
+
if (typeof a != 'object' || typeof b != 'object') return false;
|
723 |
+
// Assume equality for cyclic structures. The algorithm for detecting cyclic
|
724 |
+
// structures is adapted from ES 5.1 section 15.12.3, abstract operation `JO`.
|
725 |
+
var length = stack.length;
|
726 |
+
while (length--) {
|
727 |
+
// Linear search. Performance is inversely proportional to the number of
|
728 |
+
// unique nested structures.
|
729 |
+
if (stack[length] == a) return true;
|
730 |
+
}
|
731 |
+
// Add the first object to the stack of traversed objects.
|
732 |
+
stack.push(a);
|
733 |
+
var size = 0, result = true;
|
734 |
+
// Recursively compare objects and arrays.
|
735 |
+
if (className == '[object Array]') {
|
736 |
+
// Compare array lengths to determine if a deep comparison is necessary.
|
737 |
+
size = a.length;
|
738 |
+
result = size == b.length;
|
739 |
+
if (result) {
|
740 |
+
// Deep compare the contents, ignoring non-numeric properties.
|
741 |
+
while (size--) {
|
742 |
+
// Ensure commutative equality for sparse arrays.
|
743 |
+
if (!(result = size in a == size in b && eq(a[size], b[size], stack))) break;
|
744 |
+
}
|
745 |
+
}
|
746 |
+
} else {
|
747 |
+
// Objects with different constructors are not equivalent.
|
748 |
+
if ('constructor' in a != 'constructor' in b || a.constructor != b.constructor) return false;
|
749 |
+
// Deep compare objects.
|
750 |
+
for (var key in a) {
|
751 |
+
if (_.has(a, key)) {
|
752 |
+
// Count the expected number of properties.
|
753 |
+
size++;
|
754 |
+
// Deep compare each member.
|
755 |
+
if (!(result = _.has(b, key) && eq(a[key], b[key], stack))) break;
|
756 |
+
}
|
757 |
+
}
|
758 |
+
// Ensure that both objects contain the same number of properties.
|
759 |
+
if (result) {
|
760 |
+
for (key in b) {
|
761 |
+
if (_.has(b, key) && !(size--)) break;
|
762 |
+
}
|
763 |
+
result = !size;
|
764 |
+
}
|
765 |
+
}
|
766 |
+
// Remove the first object from the stack of traversed objects.
|
767 |
+
stack.pop();
|
768 |
+
return result;
|
769 |
+
}
|
770 |
+
|
771 |
+
// Perform a deep comparison to check if two objects are equal.
|
772 |
+
_.isEqual = function(a, b) {
|
773 |
+
return eq(a, b, []);
|
774 |
+
};
|
775 |
+
|
776 |
+
// Is a given array, string, or object empty?
|
777 |
+
// An "empty" object has no enumerable own-properties.
|
778 |
+
_.isEmpty = function(obj) {
|
779 |
+
if (obj == null) return true;
|
780 |
+
if (_.isArray(obj) || _.isString(obj)) return obj.length === 0;
|
781 |
+
for (var key in obj) if (_.has(obj, key)) return false;
|
782 |
+
return true;
|
783 |
+
};
|
784 |
+
|
785 |
+
// Is a given value a DOM element?
|
786 |
+
_.isElement = function(obj) {
|
787 |
+
return !!(obj && obj.nodeType == 1);
|
788 |
+
};
|
789 |
+
|
790 |
+
// Is a given value an array?
|
791 |
+
// Delegates to ECMA5's native Array.isArray
|
792 |
+
_.isArray = nativeIsArray || function(obj) {
|
793 |
+
return toString.call(obj) == '[object Array]';
|
794 |
+
};
|
795 |
+
|
796 |
+
// Is a given variable an object?
|
797 |
+
_.isObject = function(obj) {
|
798 |
+
return obj === Object(obj);
|
799 |
+
};
|
800 |
+
|
801 |
+
// Is a given variable an arguments object?
|
802 |
+
_.isArguments = function(obj) {
|
803 |
+
return toString.call(obj) == '[object Arguments]';
|
804 |
+
};
|
805 |
+
if (!_.isArguments(arguments)) {
|
806 |
+
_.isArguments = function(obj) {
|
807 |
+
return !!(obj && _.has(obj, 'callee'));
|
808 |
+
};
|
809 |
+
}
|
810 |
+
|
811 |
+
// Is a given value a function?
|
812 |
+
_.isFunction = function(obj) {
|
813 |
+
return toString.call(obj) == '[object Function]';
|
814 |
+
};
|
815 |
+
|
816 |
+
// Is a given value a string?
|
817 |
+
_.isString = function(obj) {
|
818 |
+
return toString.call(obj) == '[object String]';
|
819 |
+
};
|
820 |
+
|
821 |
+
// Is a given value a number?
|
822 |
+
_.isNumber = function(obj) {
|
823 |
+
return toString.call(obj) == '[object Number]';
|
824 |
+
};
|
825 |
+
|
826 |
+
// Is a given object a finite number?
|
827 |
+
_.isFinite = function(obj) {
|
828 |
+
return _.isNumber(obj) && isFinite(obj);
|
829 |
+
};
|
830 |
+
|
831 |
+
// Is the given value `NaN`?
|
832 |
+
_.isNaN = function(obj) {
|
833 |
+
// `NaN` is the only value for which `===` is not reflexive.
|
834 |
+
return obj !== obj;
|
835 |
+
};
|
836 |
+
|
837 |
+
// Is a given value a boolean?
|
838 |
+
_.isBoolean = function(obj) {
|
839 |
+
return obj === true || obj === false || toString.call(obj) == '[object Boolean]';
|
840 |
+
};
|
841 |
+
|
842 |
+
// Is a given value a date?
|
843 |
+
_.isDate = function(obj) {
|
844 |
+
return toString.call(obj) == '[object Date]';
|
845 |
+
};
|
846 |
+
|
847 |
+
// Is the given value a regular expression?
|
848 |
+
_.isRegExp = function(obj) {
|
849 |
+
return toString.call(obj) == '[object RegExp]';
|
850 |
+
};
|
851 |
+
|
852 |
+
// Is a given value equal to null?
|
853 |
+
_.isNull = function(obj) {
|
854 |
+
return obj === null;
|
855 |
+
};
|
856 |
+
|
857 |
+
// Is a given variable undefined?
|
858 |
+
_.isUndefined = function(obj) {
|
859 |
+
return obj === void 0;
|
860 |
+
};
|
861 |
+
|
862 |
+
// Has own property?
|
863 |
+
_.has = function(obj, key) {
|
864 |
+
return hasOwnProperty.call(obj, key);
|
865 |
+
};
|
866 |
+
|
867 |
+
// Utility Functions
|
868 |
+
// -----------------
|
869 |
+
|
870 |
+
// Run Underscore.js in *noConflict* mode, returning the `_` variable to its
|
871 |
+
// previous owner. Returns a reference to the Underscore object.
|
872 |
+
_.noConflict = function() {
|
873 |
+
root._ = previousUnderscore;
|
874 |
+
return this;
|
875 |
+
};
|
876 |
+
|
877 |
+
// Keep the identity function around for default iterators.
|
878 |
+
_.identity = function(value) {
|
879 |
+
return value;
|
880 |
+
};
|
881 |
+
|
882 |
+
// Run a function **n** times.
|
883 |
+
_.times = function (n, iterator, context) {
|
884 |
+
for (var i = 0; i < n; i++) iterator.call(context, i);
|
885 |
+
};
|
886 |
+
|
887 |
+
// Escape a string for HTML interpolation.
|
888 |
+
_.escape = function(string) {
|
889 |
+
return (''+string).replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>').replace(/"/g, '"').replace(/'/g, ''').replace(/\//g,'/');
|
890 |
+
};
|
891 |
+
|
892 |
+
// If the value of the named property is a function then invoke it;
|
893 |
+
// otherwise, return it.
|
894 |
+
_.result = function(object, property) {
|
895 |
+
if (object == null) return null;
|
896 |
+
var value = object[property];
|
897 |
+
return _.isFunction(value) ? value.call(object) : value;
|
898 |
+
};
|
899 |
+
|
900 |
+
// Add your own custom functions to the Underscore object, ensuring that
|
901 |
+
// they're correctly added to the OOP wrapper as well.
|
902 |
+
_.mixin = function(obj) {
|
903 |
+
each(_.functions(obj), function(name){
|
904 |
+
addToWrapper(name, _[name] = obj[name]);
|
905 |
+
});
|
906 |
+
};
|
907 |
+
|
908 |
+
// Generate a unique integer id (unique within the entire client session).
|
909 |
+
// Useful for temporary DOM ids.
|
910 |
+
var idCounter = 0;
|
911 |
+
_.uniqueId = function(prefix) {
|
912 |
+
var id = idCounter++;
|
913 |
+
return prefix ? prefix + id : id;
|
914 |
+
};
|
915 |
+
|
916 |
+
// By default, Underscore uses ERB-style template delimiters, change the
|
917 |
+
// following template settings to use alternative delimiters.
|
918 |
+
_.templateSettings = {
|
919 |
+
evaluate : /<%([\s\S]+?)%>/g,
|
920 |
+
interpolate : /<%=([\s\S]+?)%>/g,
|
921 |
+
escape : /<%-([\s\S]+?)%>/g
|
922 |
+
};
|
923 |
+
|
924 |
+
// When customizing `templateSettings`, if you don't want to define an
|
925 |
+
// interpolation, evaluation or escaping regex, we need one that is
|
926 |
+
// guaranteed not to match.
|
927 |
+
var noMatch = /.^/;
|
928 |
+
|
929 |
+
// Certain characters need to be escaped so that they can be put into a
|
930 |
+
// string literal.
|
931 |
+
var escapes = {
|
932 |
+
'\\': '\\',
|
933 |
+
"'": "'",
|
934 |
+
'r': '\r',
|
935 |
+
'n': '\n',
|
936 |
+
't': '\t',
|
937 |
+
'u2028': '\u2028',
|
938 |
+
'u2029': '\u2029'
|
939 |
+
};
|
940 |
+
|
941 |
+
for (var p in escapes) escapes[escapes[p]] = p;
|
942 |
+
var escaper = /\\|'|\r|\n|\t|\u2028|\u2029/g;
|
943 |
+
var unescaper = /\\(\\|'|r|n|t|u2028|u2029)/g;
|
944 |
+
|
945 |
+
// Within an interpolation, evaluation, or escaping, remove HTML escaping
|
946 |
+
// that had been previously added.
|
947 |
+
var unescape = function(code) {
|
948 |
+
return code.replace(unescaper, function(match, escape) {
|
949 |
+
return escapes[escape];
|
950 |
+
});
|
951 |
+
};
|
952 |
+
|
953 |
+
// JavaScript micro-templating, similar to John Resig's implementation.
|
954 |
+
// Underscore templating handles arbitrary delimiters, preserves whitespace,
|
955 |
+
// and correctly escapes quotes within interpolated code.
|
956 |
+
_.template = function(text, data, settings) {
|
957 |
+
settings = _.defaults(settings || {}, _.templateSettings);
|
958 |
+
|
959 |
+
// Compile the template source, taking care to escape characters that
|
960 |
+
// cannot be included in a string literal and then unescape them in code
|
961 |
+
// blocks.
|
962 |
+
var source = "__p+='" + text
|
963 |
+
.replace(escaper, function(match) {
|
964 |
+
return '\\' + escapes[match];
|
965 |
+
})
|
966 |
+
.replace(settings.escape || noMatch, function(match, code) {
|
967 |
+
return "'+\n_.escape(" + unescape(code) + ")+\n'";
|
968 |
+
})
|
969 |
+
.replace(settings.interpolate || noMatch, function(match, code) {
|
970 |
+
return "'+\n(" + unescape(code) + ")+\n'";
|
971 |
+
})
|
972 |
+
.replace(settings.evaluate || noMatch, function(match, code) {
|
973 |
+
return "';\n" + unescape(code) + "\n;__p+='";
|
974 |
+
}) + "';\n";
|
975 |
+
|
976 |
+
// If a variable is not specified, place data values in local scope.
|
977 |
+
if (!settings.variable) source = 'with(obj||{}){\n' + source + '}\n';
|
978 |
+
|
979 |
+
source = "var __p='';" +
|
980 |
+
"var print=function(){__p+=Array.prototype.join.call(arguments, '')};\n" +
|
981 |
+
source + "return __p;\n";
|
982 |
+
|
983 |
+
var render = new Function(settings.variable || 'obj', '_', source);
|
984 |
+
if (data) return render(data, _);
|
985 |
+
var template = function(data) {
|
986 |
+
return render.call(this, data, _);
|
987 |
+
};
|
988 |
+
|
989 |
+
// Provide the compiled function source as a convenience for build time
|
990 |
+
// precompilation.
|
991 |
+
template.source = 'function(' + (settings.variable || 'obj') + '){\n' +
|
992 |
+
source + '}';
|
993 |
+
|
994 |
+
return template;
|
995 |
+
};
|
996 |
+
|
997 |
+
// Add a "chain" function, which will delegate to the wrapper.
|
998 |
+
_.chain = function(obj) {
|
999 |
+
return _(obj).chain();
|
1000 |
+
};
|
1001 |
+
|
1002 |
+
// The OOP Wrapper
|
1003 |
+
// ---------------
|
1004 |
+
|
1005 |
+
// If Underscore is called as a function, it returns a wrapped object that
|
1006 |
+
// can be used OO-style. This wrapper holds altered versions of all the
|
1007 |
+
// underscore functions. Wrapped objects may be chained.
|
1008 |
+
var wrapper = function(obj) { this._wrapped = obj; };
|
1009 |
+
|
1010 |
+
// Expose `wrapper.prototype` as `_.prototype`
|
1011 |
+
_.prototype = wrapper.prototype;
|
1012 |
+
|
1013 |
+
// Helper function to continue chaining intermediate results.
|
1014 |
+
var result = function(obj, chain) {
|
1015 |
+
return chain ? _(obj).chain() : obj;
|
1016 |
+
};
|
1017 |
+
|
1018 |
+
// A method to easily add functions to the OOP wrapper.
|
1019 |
+
var addToWrapper = function(name, func) {
|
1020 |
+
wrapper.prototype[name] = function() {
|
1021 |
+
var args = slice.call(arguments);
|
1022 |
+
unshift.call(args, this._wrapped);
|
1023 |
+
return result(func.apply(_, args), this._chain);
|
1024 |
+
};
|
1025 |
+
};
|
1026 |
+
|
1027 |
+
// Add all of the Underscore functions to the wrapper object.
|
1028 |
+
_.mixin(_);
|
1029 |
+
|
1030 |
+
// Add all mutator Array functions to the wrapper.
|
1031 |
+
each(['pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift'], function(name) {
|
1032 |
+
var method = ArrayProto[name];
|
1033 |
+
wrapper.prototype[name] = function() {
|
1034 |
+
var wrapped = this._wrapped;
|
1035 |
+
method.apply(wrapped, arguments);
|
1036 |
+
var length = wrapped.length;
|
1037 |
+
if ((name == 'shift' || name == 'splice') && length === 0) delete wrapped[0];
|
1038 |
+
return result(wrapped, this._chain);
|
1039 |
+
};
|
1040 |
+
});
|
1041 |
+
|
1042 |
+
// Add all accessor Array functions to the wrapper.
|
1043 |
+
each(['concat', 'join', 'slice'], function(name) {
|
1044 |
+
var method = ArrayProto[name];
|
1045 |
+
wrapper.prototype[name] = function() {
|
1046 |
+
return result(method.apply(this._wrapped, arguments), this._chain);
|
1047 |
+
};
|
1048 |
+
});
|
1049 |
+
|
1050 |
+
// Start chaining a wrapped Underscore object.
|
1051 |
+
wrapper.prototype.chain = function() {
|
1052 |
+
this._chain = true;
|
1053 |
+
return this;
|
1054 |
+
};
|
1055 |
+
|
1056 |
+
// Extracts the result from a wrapped and chained object.
|
1057 |
+
wrapper.prototype.value = function() {
|
1058 |
+
return this._wrapped;
|
1059 |
+
};
|
1060 |
+
|
1061 |
+
}).call(this);
|
README.txt
CHANGED
@@ -1,187 +1,453 @@
|
|
1 |
-
===
|
2 |
Contributors: codepeople
|
3 |
-
Donate link: http://wordpress.dwbooster.com/
|
4 |
-
Tags:
|
5 |
Requires at least: 3.0.5
|
6 |
Tested up to: 4.6
|
7 |
Stable tag: trunk
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
11 |
-
|
12 |
|
13 |
== Description ==
|
14 |
|
15 |
-
|
16 |
|
17 |
-
|
18 |
|
19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
20 |
|
21 |
-
|
22 |
|
23 |
-
|
24 |
|
25 |
-
|
26 |
|
27 |
-
|
28 |
|
29 |
-
|
|
|
|
|
|
|
|
|
30 |
|
31 |
-
= Features: =
|
32 |
|
33 |
-
|
34 |
-
* Supports many contact forms into the same WP website, each one with its own prices and settings.
|
35 |
-
* You can customize the notification email details, including from address, subject and content.
|
36 |
-
* Includes optional captcha verification.
|
37 |
-
* Supports HTML formatted emails (*)
|
38 |
-
* Can be tested with the PayPal Sandbox
|
39 |
-
* Exports the submissions to CSV/Excel
|
40 |
-
* Developer by an [Official PayPal Partner](https://www.paypal-marketing.com/paypal/html/hosted/emarketing/partner/directory/#k=net+factor&n=2000009361343&m=p).
|
41 |
-
|
42 |
-
= Proffesional Version Features: =
|
43 |
-
|
44 |
-
The following features aren't part of the free version. The following features are present only in the pro version
|
45 |
-
|
46 |
-
* Visual form builder: The free version includes the payment form with an email field plus the required PayPal fields. If you need a different form you should opt for the commercial version.
|
47 |
-
* In the commercial version PayPal Standard is supported in addition to PayPal Pro.
|
48 |
-
|
49 |
-
If you are interested in a version with the pro features you can get it here: http://wordpress.dwbooster.com/forms/paypal-payment-pro-form
|
50 |
-
|
51 |
-
= Language Support =
|
52 |
-
|
53 |
-
The Payment Form for PayPal Pro plugin is compatible with all charsets. The troubleshoot area contains options to change the encoding of the plugin database tables if needed.
|
54 |
-
|
55 |
-
Translations are supported through PO/MO files located in the Payment Form for PayPal Pro plugin folder "languages".
|
56 |
-
|
57 |
-
The following translations are already included in the plugin:
|
58 |
-
|
59 |
-
* Afrikaans (af)
|
60 |
-
* Albanian (sq)
|
61 |
-
* Arabic (ar)
|
62 |
-
* Armenian (hy_AM)
|
63 |
-
* Azerbaijani (az)
|
64 |
-
* Basque (eu)
|
65 |
-
* Belarusian (be_BY)
|
66 |
-
* Bosnian (bs_BA)
|
67 |
-
* Bulgarian (bg_BG)
|
68 |
-
* Catalan (ca)
|
69 |
-
* Central Kurdish (ckb)
|
70 |
-
* Chinese (China zh_CN)
|
71 |
-
* Chinese (Taiwan zh_TW)
|
72 |
-
* Croatian (hr)
|
73 |
-
* Czech (cs_CZ)
|
74 |
-
* Danish (da_DK)
|
75 |
-
* Dutch (nl_NL)
|
76 |
-
* Esperanto (eo_EO)
|
77 |
-
* Estonian (et)
|
78 |
-
* Finnish (fi)
|
79 |
-
* French (fr_FR)
|
80 |
-
* Galician (gl_ES)
|
81 |
-
* Georgian (ka_GE)
|
82 |
-
* German (de_DE)
|
83 |
-
* Greek (el)
|
84 |
-
* Gujarati (gu_IN)
|
85 |
-
* Hebrew (he_IL)
|
86 |
-
* Hindi (hi_IN)
|
87 |
-
* Hungarian (hu_HU)
|
88 |
-
* Indian Bengali (bn_IN)
|
89 |
-
* Indonesian (id_ID)
|
90 |
-
* Irish (ga_IE)
|
91 |
-
* Italian (it_IT)
|
92 |
-
* Japanese (ja)
|
93 |
-
* Korean (ko_KR)
|
94 |
-
* Latvian (lv)
|
95 |
-
* Lithuanian (lt_LT)
|
96 |
-
* Macedonian (mk_MK)
|
97 |
-
* Malay (ms_MY)
|
98 |
-
* Malayalam (ml_IN)
|
99 |
-
* Maltese (mt_MT)
|
100 |
-
* Norwegian (nb_NO)
|
101 |
-
* Persian (fa_IR)
|
102 |
-
* Polish (pl_PL)
|
103 |
-
* Portuguese Brazil(pt_BR)
|
104 |
-
* Portuguese (pt_PT)
|
105 |
-
* Punjabi (pa_IN)
|
106 |
-
* Russian (ru_RU)
|
107 |
-
* Romanian (ro_RO)
|
108 |
-
* Serbian (sr_RS)
|
109 |
-
* Slovak (sk_SK)
|
110 |
-
* Slovene (sl_SI)
|
111 |
-
* Spanish (es_ES)
|
112 |
-
* Swedish (sv_SE)
|
113 |
-
* Tagalog (tl)
|
114 |
-
* Tamil (ta)
|
115 |
-
* Thai (th)
|
116 |
-
* Turkish (tr_TR)
|
117 |
-
* Ukrainian (uk)
|
118 |
-
* Vietnamese (vi)
|
119 |
|
120 |
-
=
|
121 |
|
122 |
-
|
123 |
|
124 |
-
|
125 |
|
126 |
-
|
127 |
|
128 |
-
|
129 |
-
2. Upload the entire paypal-payment-pro-form/ directory to the /wp-content/plugins/ directory
|
130 |
-
3. Activate the Payment Form for PayPal Pro plugin through the Plugins menu in WordPress
|
131 |
-
4. Configure the PayPal contact form settings at the administration menu >> Settings >> Payment Form for PayPal Pro
|
132 |
-
5. To insert the PayPal contact form into some content or post use the icon that will appear when editing contents
|
133 |
|
134 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
135 |
|
136 |
-
|
137 |
|
138 |
-
|
139 |
|
140 |
-
http://wordpress.dwbooster.com/
|
141 |
|
142 |
-
|
143 |
|
144 |
-
|
145 |
|
146 |
-
|
147 |
|
148 |
-
|
149 |
|
150 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
151 |
|
152 |
|
153 |
== Screenshots ==
|
154 |
|
155 |
-
1.
|
156 |
-
2.
|
157 |
-
3.
|
158 |
-
4.
|
|
|
|
|
|
|
|
|
|
|
159 |
|
160 |
== Changelog ==
|
161 |
|
162 |
= 1.0.1 =
|
163 |
-
*
|
|
|
|
|
|
|
|
|
|
|
164 |
|
165 |
= 1.0.2 =
|
166 |
-
*
|
167 |
-
|
168 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
169 |
* Tested and compatible with WordPress 4.4
|
170 |
-
* Fixed parameter value in saving settings process.
|
171 |
|
172 |
-
= 1.
|
173 |
-
*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
174 |
|
175 |
-
= 1.
|
176 |
-
*
|
177 |
|
178 |
-
= 1.
|
179 |
-
*
|
180 |
|
181 |
-
= 1.
|
182 |
-
* Fixed
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
183 |
|
184 |
== Upgrade Notice ==
|
185 |
|
186 |
-
= 1.
|
187 |
-
|
|
|
|
1 |
+
=== Calendar Event Multi View ===
|
2 |
Contributors: codepeople
|
3 |
+
Donate link: http://wordpress.dwbooster.com/calendars/cp-multi-view-calendar
|
4 |
+
Tags: calendar,calendars,event calendar,event,event manager,images,picture calendar,plugin,page,post,shortcode,ical,images calendar,calendar, plugin,recurring,recurring events,google calendar,event management, events, events calendar, day calendar, week calendar, month calendar
|
5 |
Requires at least: 3.0.5
|
6 |
Tested up to: 4.6
|
7 |
Stable tag: trunk
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
11 |
+
Event calendar for WordPress websites that features multiple visualization modes.
|
12 |
|
13 |
== Description ==
|
14 |
|
15 |
+
The CP Multi View Event Calendar is an **event calendar** for WordPress websites that features multiple visualization modes and multiple predefined styles.
|
16 |
|
17 |
+
= Features: =
|
18 |
|
19 |
+
* Classic month view (like Google Calendar)
|
20 |
+
* Multi-month view (show a configurable number of months at once)
|
21 |
+
* Day view
|
22 |
+
* Week view
|
23 |
+
* Multiple configurations for the views, the same view can be used in a very different way
|
24 |
+
* Allows multiple views for the same event calendar on the same page
|
25 |
+
* Configurable start day of the week
|
26 |
+
* Can be setup to edit the events from the public website
|
27 |
+
* You can select which button show/display (ex: navigation buttons, refresh button, others...)
|
28 |
+
* The event calendar information can be displayed in many ways: Title on the event calendar + tooltip on mouse over or Title on the event calendar + tooltip on mouse click
|
29 |
+
* Events can have a location and an extended rich text description
|
30 |
+
* Multiple selectable colors to highlight events in the calendar
|
31 |
+
* Events can be linked to other pages.
|
32 |
+
* Can display images directly on the calendar cells
|
33 |
+
* Can be easily published in a page or post by using its shortcode or visual publish button
|
34 |
+
* Can be setup to use a 12 or 24 hour clock.
|
35 |
+
* Can be setup to display only the weekdays needed
|
36 |
+
* Fast Ajax load for the events data
|
37 |
+
* Recurring events / repeat events like Google Calendar
|
38 |
+
|
39 |
+
You can see 20 sample visualization modes and an online demo at: http://wordpress.dwbooster.com/calendars/cp-multi-view-calendar
|
40 |
+
|
41 |
+
**Languages Included in the Calendar**
|
42 |
+
|
43 |
+
* English
|
44 |
+
* Spanish
|
45 |
+
* French
|
46 |
+
* German
|
47 |
+
* Italian
|
48 |
+
* Russian
|
49 |
+
* Portuguese
|
50 |
+
* Portuguese (Brasil)
|
51 |
+
* Danish
|
52 |
+
* Czech
|
53 |
+
* Dutch
|
54 |
+
* Norwegian
|
55 |
+
* Polish
|
56 |
+
* Slovak
|
57 |
+
|
58 |
+
If your language is not listed here and not available in the calendar feel free to open a support ticket and it will be added asap.
|
59 |
+
|
60 |
+
**Update note**
|
61 |
+
|
62 |
+
New: The latest update features a new interface for easily editing a previously inserted event calendar view and preview buttons for a faster verification of how the event calendar will look in the website.
|
63 |
+
|
64 |
+
= Import / Export events using iCal =
|
65 |
+
|
66 |
+
The option to import events from iCal files and export the calendar events to iCal files is currently available in the **Platinum version** of the plugin (commercial version). The iCal / .ics files supported are compatible with the Google Calendar iCal format.
|
67 |
|
68 |
+
= Updates =
|
69 |
|
70 |
+
New features has been published in the current CP Multi View Event Calendar version 1.2.1 based on the feedback received and we would like to thank you all the people that have supported the development, provided feedback and feature requests. The plugin is currently over the 40,000 downloads/installations and a new set of updates is already being prepared, any feature requests will be welcome. Thank you!
|
71 |
|
72 |
+
== Installation ==
|
73 |
|
74 |
+
To install **CP Multi View Event Calendar**, follow these steps:
|
75 |
|
76 |
+
1. Download and unzip the CP Multi View Event Calendar plugin
|
77 |
+
2. Upload the entire cp-multi-view-calendar/ directory to the /wp-content/plugins/ directory
|
78 |
+
3. Activate the CP Multi View Event Calendar plugin through the Plugins menu in WordPress
|
79 |
+
4. Configure the settings at the administration menu >> CP Multi View Event Calendar.
|
80 |
+
5. To insert the calendar form into some content or post use the icon that will appear when editing contents
|
81 |
|
|
|
82 |
|
83 |
+
== Frequently Asked Questions ==
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
84 |
|
85 |
+
= Q: What means each field in the event calendar settings area? =
|
86 |
|
87 |
+
A: The product's page contains detailed information about each event calendar field and customization:
|
88 |
|
89 |
+
http://wordpress.dwbooster.com/calendars/cp-multi-view-calendar
|
90 |
|
91 |
+
= Q: How events are added into the event calendar? =
|
92 |
|
93 |
+
A: In the dashboard area go to "WordPress administration menu >> CP Multiview Event Calendar" and click the button "Admin Calendar Data" that leads to a page where you can add/edit/delete events on the events calendar.
|
|
|
|
|
|
|
|
|
94 |
|
95 |
+
The events edition on the public event calendar can be also (optionally) enabled, that way the website visitors can edit events directly in the event calendar without having to access through the dashboard.
|
96 |
+
|
97 |
+
= Q: How show the entire title on month,week and day view? =
|
98 |
+
|
99 |
+
A: Open the file "wp-content/plugins/cp-multi-view-calendar/DC_MultiViewCal/css/main.css" and add this CSS rule at end of the file:
|
100 |
+
|
101 |
+
#multicalendar .rb-i{white-space:normal}
|
102 |
+
|
103 |
+
|
104 |
+
= Q: How to show differents colors in the event calendar nMonth view? =
|
105 |
+
|
106 |
+
A: Use the following configuration parameter:
|
107 |
+
|
108 |
+
date_box_with_color_in_nmonth_view:true
|
109 |
+
|
110 |
+
The parameters should be added into the "Other Parameters" box. These parameters must be comma separated and will overwrite the initialconfiguration selected for the event calendar.
|
111 |
+
|
112 |
+
The "Other Parameters" box can be found in the following location (link to image):
|
113 |
+
|
114 |
+
http://wordpress.dwbooster.com/UserFiles/Image/cp-multiview-calendar/additional-parameters.gif
|
115 |
+
|
116 |
+
= Q: How to allow edition on the public event calendar only for some registered users? =
|
117 |
+
|
118 |
+
A: If you want to setup the event calendar editable only by some users in the public website then publish a view of the event calendar in a private page (restrict the access to the page with the event calendar with "Edition" enabled).
|
119 |
+
|
120 |
+
You can have multiple views of the same event calendar, one for read-only public access and another view with edition enabled on a private page accessible only by registered users.
|
121 |
+
|
122 |
+
Note that there are two different concepts here:
|
123 |
+
|
124 |
+
* **An event calendar:** This is a unit of information and events. The events aren't shared with other event calendars.
|
125 |
+
* **An event calendar's view:** This is the way an event calendar is displayed. The same event calendar can have multiple views in the same page or in different pages. Since the event calendar unit is the same the data is shared between all views but the visual settings and features can be different.
|
126 |
+
|
127 |
+
See also this other FAQ entry about additional permissions settings: http://wordpress.dwbooster.com/faq/cp-multi-view-calendar#q205
|
128 |
+
|
129 |
+
= Q: How show the entire title on month,week and day view on the event calendar? =
|
130 |
+
|
131 |
+
A: Open the calendar plugin file "wp-content/plugins/cp-multi-view-calendar/DC_MultiViewCal/css/main.css" and add this CSS rule at end of the file:
|
132 |
+
|
133 |
+
#multicalendar .rb-i{white-space:normal}
|
134 |
+
|
135 |
+
= Q: Can I change the event calendar plugin date format to DD/MM/YYYY? =
|
136 |
+
|
137 |
+
A: The date format is automatically defined with each language to the proper values, however if you want to overwrite those settings open your plugin language file "wp-content\plugins\cp-multi-view-calendar\DC_MultiViewCal\language\multiview_lang_**xx-XX**.js", where **xx-XX** in the file name is your language identifier and into that file modify the items marked below:
|
138 |
+
|
139 |
+
"fulldaykey": "MMddyyyy",
|
140 |
+
"fulldayshow": "L d yyyy",
|
141 |
+
"fulldayvalue": "M/d/yyyy",
|
142 |
+
"Md": "W M/d",
|
143 |
+
"nDaysView": "M/d",
|
144 |
+
"Md3": "L d",
|
145 |
+
"separator": "/",
|
146 |
+
"year_index": 2,
|
147 |
+
"month_index": 0,
|
148 |
+
"day_index": 1,
|
149 |
+
|
150 |
+
... to this:
|
151 |
+
|
152 |
+
"fulldaykey": "ddMMyyyy",
|
153 |
+
"fulldayshow": "d L yyyy",
|
154 |
+
"fulldayvalue": "d/M/yyyy",
|
155 |
+
"Md": "W d/M",
|
156 |
+
"nDaysView": "d/M",
|
157 |
+
"Md3": "d L",
|
158 |
+
"separator": "/",
|
159 |
+
"year_index": 2,
|
160 |
+
"month_index": 1,
|
161 |
+
"day_index": 0,
|
162 |
+
|
163 |
+
|
164 |
+
== Other Notes ==
|
165 |
+
|
166 |
+
= Settings in the event calendar insertion area =
|
167 |
+
|
168 |
+
To insert the event calendar form into some content or post use the insertion area that will appear below the editor when editing contents. It looks like the following image:
|
169 |
+
|
170 |
+
http://wordpress.dwbooster.com/UserFiles/Image/cp-multiview-calendar/insert-calendar.png
|
171 |
+
|
172 |
+
The fields on the event calendar insertion area (shown in the above image) are the following:
|
173 |
+
|
174 |
+
* MultiCalendar: Which of the event calendars will be shown.
|
175 |
+
* Calendar Views: The event calendar views that will be included in the event calendar.
|
176 |
+
* Default View: Wich of the event calendar views will appear as default.
|
177 |
+
* Start day of the week: The start day of the week (Ex: Sunday, Monday, ...).
|
178 |
+
* CSS Style: Select one of the CSS styles available to render the calendar.
|
179 |
+
* Palette Color: The palete color used for the events in the calendar.
|
180 |
+
* Allow edition: Check this box if the event calendar will allow edition on the public website.
|
181 |
+
* Other buttons: Select the buttons that will be displayed on the top of the event calendar.
|
182 |
+
* Number of Months for nMonths View: Number of months shown at the same time in the event calendar's nMonths View.
|
183 |
+
* Other parameters for nMonths View: Other parameters for the event calendar's nMonths View (more info below).
|
184 |
+
* Other parameters: Other parameters that apply to all event calendar views (more info below).
|
185 |
+
|
186 |
+
= Adding custom parameters to the event calendar =
|
187 |
+
|
188 |
+
The additional parameters should be added into the "Other Parameters" box in the event calendar insertion area. These parameters must be comma separated and will overwrite the initial configuration selected for the event calendar.
|
189 |
+
|
190 |
+
The "Other Parameters" box can be found in the following location (click to enlarge image): http://wordpress.dwbooster.com/demos/multi-view/screenshots/additional-parameters.png
|
191 |
+
|
192 |
+
= Adding custom CSS Styles to the event calendar =
|
193 |
+
|
194 |
+
The custom CSS styles for the event calendar should be set at the end of the CSS file "wp-content/plugins/cp-multi-view-calendar/DC_MultiViewCal/css/main.css".
|
195 |
+
|
196 |
+
= Sample event calendar views =
|
197 |
+
|
198 |
+
The following area some sample event calendar views. You can apply or mix configurations to get your own event calendar views in addition to the following samples:
|
199 |
+
|
200 |
+
1. **View day only:** Event calendar configured with the "day" view option only, the "Default View" should be "day". The views "Week", "Month", "nMonth" should be unchecked. To fix the height, just add (for example) the parameter "height:400". Event Calendar sample for this view: http://wordpress.dwbooster.com/demos/multi-view/01-view-day-only.html
|
201 |
+
|
202 |
+
2. **View week only:** Event calendar configured with the view week option only; the "Week" view should be enabled and the default view should be "week". The views "Day", "Month" and "nMonth" should be disabled. To fix the height, just add (for example) the parameter "height:400". Event Calendar sample for this view: http://wordpress.dwbooster.com/demos/multi-view/02-view-week-only.html
|
203 |
+
|
204 |
+
3. **View month only:** Event calendar configured with the view month option only. To get this enable the "Month" view and set the default view to "month". The views "Day", "Week" and "nMonth" should be unchecked. To fix the height, just add (for example) the parameter "height:400". Event Calendar sample for this view: http://wordpress.dwbooster.com/demos/multi-view/03-view-month-only.html
|
205 |
|
206 |
+
4. **View n-Months only:** Event calendar configured with the view n-Months option only. This can be done by setting the amount of months to display in the event calendar to 12, enable only the "n-Month" view and setting the "Default View" to "nMonth". All the other views and buttons should be unchecked. In the styles for this sample we have selected to fix the calendar width. Event Calendar sample for this view: http://wordpress.dwbooster.com/demos/multi-view/04-view-n-months-only.html
|
207 |
|
208 |
+
5. **Small event calendar:** You can configure the event calendar just like a single small event calendar. This can be done by selecting the n-Months view and setting the "Number of Months for nMonths View" dropdown select box to 1. Event Calendar sample for this view: http://wordpress.dwbooster.com/demos/multi-view/05-small-calendar.html
|
209 |
|
210 |
+
6. **n-Month view, only one month, large view:** Event calendar with the n-Month view configured to display a single month in a large view. To get this result enable only the "n-Month" view and add the styles specified in the following event calendar sample page: http://wordpress.dwbooster.com/demos/multi-view/06-one-month-large-view.html
|
211 |
|
212 |
+
7. **n-Month view with 2 months using all the width:** To get this result in the event calendar enable only the "n-Month" view, set the "Number of Months for nMonths View" dropdown select box to 2 and add the styles specified in the following sample page to fix the width of both the event calendar area and the width of each month: http://wordpress.dwbooster.com/demos/multi-view/07-two-months-using-all-the-width.html
|
213 |
|
214 |
+
8. **n-Month view, 3 months with vertical align:** The first settings needed to get this event calendar configuration is to enable only the "n-Month" view and set the "Number of Months for nMonths View" dropdown select box to show 3 months. After that proceed to add some CSS styles to fix the width to the desired column width. This way you can publish the calendar in the sidebar of your website. Event Calendar sample for this view: http://wordpress.dwbooster.com/demos/multi-view/08-various-months-with-vertical-align.html
|
215 |
|
216 |
+
9. **Tooltip displayed on month,week and day view:** In this event calendar sample, when you click over an event in the calendar, a floating tooltip panel with additional information is displayed. This type of tooltip is available for the month, week and day views. The n-Month view has a different type of tooltip panel. To enable the tooltips, the parameter "showtooltipdwm" must be set to "true" (or enable it by checking the checkbox in the visual configuration). In addition to these parameters, add also the styles mentioned in the following page as instructed: http://wordpress.dwbooster.com/demos/multi-view/09-tooltip-displayed.html
|
217 |
|
218 |
+
10. **Lighter view for events and center align:** This event calendar sample features the month, week and day views showing the events with a more lighter view: a color border is used instead filled backgrounds and the text is centered. The tooltips are already enabled for this sample; to enable the tooltips you can do that by checking the tooltip checkbox in the visual configuration or just by setting parameter "showtooltipdwm" to "true", this is also explained in other demos. To get the more lighter view you can add the styles indicated at this page: http://wordpress.dwbooster.com/demos/multi-view/10-lighter-view-center-align.html
|
219 |
|
220 |
+
11. **Multi-line event description:** Event calendar that displays a multi-line event description in the month, week and day views, this is useful to display more information directly over the calendar. Only two CSS rules should be added to the styles to get this configuration. It will work with any selection of parameters if you are using one of the mentioned views. Check the detailed instructions at this page: http://wordpress.dwbooster.com/demos/multi-view/11-multi-line-event-description.html
|
221 |
+
|
222 |
+
12. **Images and HTML formatting in tooltip:** The tooltips on the event calendar can show images and formatted text. There are some styles that can be used to show/hide/customize the title, location, description and time: these styles are the CSS classes named "bubbletitle", "bubblelocation", "bubbledescription" and "bubbletime". In this sample we have used only the class "bubbletime" to align it at the bottom of the content/image: http://wordpress.dwbooster.com/demos/multi-view/12-images-and-html-formatting-in-tooltip.html
|
223 |
+
|
224 |
+
13. **Images directly on the calendar cells:** You can use this event calendar like a picture calendar. The images should be added to the event description and the css rules mentioned in the following page to complete the formatting: http://wordpress.dwbooster.com/demos/multi-view/13-images-directly-on-the-calendar-cells.html
|
225 |
+
|
226 |
+
14. **Show only from Monday to Friday:** In this event sample we have disabled the Saturday and Sunday since this is a common configuration. In the "viewWeekDays" parameter, each number in the array represents a weekday from Sunday to Saturday. An zero means that the weekday is disabled (not shown) and a 1 means that the day is enabled (shown). Details at: http://wordpress.dwbooster.com/demos/multi-view/14-show-only-from-monday-to-friday.html
|
227 |
+
|
228 |
+
15. **Using 12 or 24 hour clock:** This event calendar supports both the 12 and the 24 hour clock (also known as military time). The 24-hour clock is enabled as default; if you prefer to use the 12-hour clock then just set the parameter "militaryTime" to "false". Event calendar sample for this view: http://wordpress.dwbooster.com/demos/multi-view/15-using-12-or-24-hour-clock.html
|
229 |
+
|
230 |
+
16. **Showing the n-Days view:** With this event calendar view you can display many days in a view similar to the single day view. First you should enable the "nDays" view and then set the number of days to view on each calendar page. The parameters are viewNDays:true for enabling the view, numberOfDays:10 for setting the number of days and viewdefault:"nDays" to make it the default view if needed. Event calendar sample for this view: http://wordpress.dwbooster.com/demos/multi-view/16-n-days-view.html
|
231 |
+
|
232 |
+
17. **Selecting hours to be shown:** In some applications you may want to select only some hours to be shown in the event calendar, for example working hours. In the "Days", "nDays" and "Week" views you can select the range of hours to be shown be setting the start and end hours. Three parameters must be specified for this: the start hour hoursStart:8, the end hour hoursEnd:17 and the height of a single hour cell cellheight:60. Hours are in military time, so 17 means 5:00pm. Event calendar sample for this view: http://wordpress.dwbooster.com/demos/multi-view/17-selecting-hours-to-be-shown.html
|
233 |
+
|
234 |
+
18. **Using drop-down lists for location and title:** The location and title that are part of each event's description in the calendar are open/editable fields by default but you can convert them in drop-down lists to make them easier to edit and keep the data consistency. Event calendar sample for this view and detailed instructions: http://wordpress.dwbooster.com/demos/multi-view/18-lists-for-location-and-title.html
|
235 |
+
|
236 |
+
19. **Multi-column day view, location or title:** In this event calendar sample the location and title have been converted in drop-down lists as explained in the previous sample #18. In addition to that now we have selected to use the "title" field as the column header in the day view, this way the events are placed in different columns agrupated by their titles. The same can be done with the location instead the title. Event calendar sample for this view and detailed instructions: http://wordpress.dwbooster.com/demos/multi-view/19-multi-column-day-view.html
|
237 |
+
|
238 |
+
20. **Day view with location & title grid:** The event calendar day view can be modified to show the title and location as headers of the rows and column instead the default single columns and the hour in the row header. This is useful to display informations agrupated by title and location on each day. Event calendar sample for this view and detailed instructions: http://wordpress.dwbooster.com/demos/multi-view/20-day-view-with-location-title-grid.html
|
239 |
|
240 |
|
241 |
== Screenshots ==
|
242 |
|
243 |
+
1. Classic Multi View Event Calendar (Google Calendar Style)
|
244 |
+
2. Event calendar in Month view with event information floating panel
|
245 |
+
3. Event calendar with images on the event calendar cells
|
246 |
+
4. Classic little event calendar for sidebars
|
247 |
+
5. Event calendar in single day view
|
248 |
+
6. Event calendar in single month view
|
249 |
+
7. Advanced sample: Event calendar with custom information on rows
|
250 |
+
8. Advanced sample: Event calendar with custom information on both rows and columns
|
251 |
+
|
252 |
|
253 |
== Changelog ==
|
254 |
|
255 |
= 1.0.1 =
|
256 |
+
* Interface modifications.
|
257 |
+
* Added missing images folder
|
258 |
+
* Preview options for the event calendar views
|
259 |
+
* Fixed bug with special characters in events
|
260 |
+
* Compatible with the latest WP versions
|
261 |
+
* Modifications to make the calendar responsive
|
262 |
|
263 |
= 1.0.2 =
|
264 |
+
* Improved plugin security
|
265 |
+
* Fixed warning that appeared with PHP safe mode restrictions
|
266 |
+
* Sanitized GET parameters used in queries
|
267 |
+
|
268 |
+
= 1.1.5 =
|
269 |
+
* Fixed SQL and XSS Vulnerabilities (vulnerability was found by Joaquin Ramirez Martinez with the help Christian Mondragon Uriel Zarate)
|
270 |
+
* Translations improved
|
271 |
+
* Update to the ajax url paths
|
272 |
+
* Fixed bug related to the date format
|
273 |
+
|
274 |
+
= 1.1.6 =
|
275 |
+
* Sanitized output of items on the admin area
|
276 |
+
|
277 |
+
= 1.1.7 =
|
278 |
+
* Tooltip setting is now marked as default
|
279 |
+
* New col attribute in the day view with columns
|
280 |
+
* Pre-selection of items in quick add tooltip features
|
281 |
+
* Compatible with the latest WordPress 4.2.x version
|
282 |
+
|
283 |
+
= 1.1.8 =
|
284 |
+
* Fixed SQL vulnerability (thank you to Joaquin Ramirez Martinez for the report)
|
285 |
+
|
286 |
+
= 1.1.9 =
|
287 |
+
* Fixed bug related to the latest day of the month for repeat events
|
288 |
+
* Added tracking to error codes
|
289 |
+
* Fixed bug in parameters processing
|
290 |
+
|
291 |
+
= 1.2.1 =
|
292 |
+
* Compatible with WordPress 4.3
|
293 |
+
* Fixed bug in the mindate parameter.
|
294 |
+
* Update to the new PHP style contructor for WP 4.3
|
295 |
+
* Replaced heading tags in admin interface.
|
296 |
+
* Fixed bug related to undefined message that appeared under slow connections.
|
297 |
+
|
298 |
+
= 1.2.2 =
|
299 |
+
* Updated CSS rules to avoid conflicts in WP 4.3
|
300 |
+
|
301 |
+
= 1.2.3 =
|
302 |
+
* Fixed bug related to recurrent events.
|
303 |
+
* Added note about the recurrent events
|
304 |
+
|
305 |
+
= 1.2.4 =
|
306 |
+
* Add configurable dialog width in the day, week, month and nMonth views
|
307 |
+
|
308 |
+
= 1.2.5 =
|
309 |
+
* Fixed bug related to the annually repeat event.
|
310 |
+
|
311 |
+
= 1.2.6 =
|
312 |
+
* Prevent recurrent events be moved with drag and drop feature to keep data integrity
|
313 |
+
* Fixed bug related to loosing focus while editing event details
|
314 |
+
|
315 |
+
= 1.2.7 =
|
316 |
+
* Fixed bug related to the heigh of the cell in the day and week view
|
317 |
+
* Fixed bug related to recurrent events in List View
|
318 |
+
* Fixed bug related to resize event in the day and week view
|
319 |
+
|
320 |
+
= 1.2.8 =
|
321 |
+
* Fixed script error
|
322 |
+
* Fixed bug in month view
|
323 |
+
|
324 |
+
= 1.2.9 =
|
325 |
* Tested and compatible with WordPress 4.4
|
|
|
326 |
|
327 |
+
= 1.2.10 =
|
328 |
+
* Fixed underline CSS issues
|
329 |
+
* Fixed bug related event color in the move action
|
330 |
+
|
331 |
+
= 1.2.11 =
|
332 |
+
* Fixed bug related to the autoselect color in the event edition
|
333 |
+
|
334 |
+
= 1.2.12 =
|
335 |
+
* Fixed bug related to the "more events" feature
|
336 |
+
|
337 |
+
= 1.2.13 =
|
338 |
+
* Fixed bug in the "more events" text
|
339 |
+
* Fixed bug in the quick add button
|
340 |
+
|
341 |
+
= 1.2.14 =
|
342 |
+
* Translation corrections
|
343 |
+
|
344 |
+
= 1.2.15 =
|
345 |
+
* Improved the visualization in the day and week view
|
346 |
+
|
347 |
+
= 1.2.16 =
|
348 |
+
* Fixed bug related to render after quick add event button
|
349 |
+
|
350 |
+
= 1.2.17 =
|
351 |
+
* Fixed problem with the focus in chrome quick add button
|
352 |
+
|
353 |
+
= 1.2.18 =
|
354 |
+
* Fix for a correct refresh of the calendar after editing an event.
|
355 |
+
* Update for fixing update date issue
|
356 |
+
|
357 |
+
= 1.2.19 =
|
358 |
+
* Fixed bug in month view with quick add button.
|
359 |
+
|
360 |
+
= 1.2.20 =
|
361 |
+
* Fixed bug when loading events from database
|
362 |
+
|
363 |
+
= 1.2.21 =
|
364 |
+
* CSS update to fix the weekday color in the nMonth view
|
365 |
+
|
366 |
+
= 1.2.22 =
|
367 |
+
* Fixed bug in the editor to keep the focus in the description field
|
368 |
+
|
369 |
+
= 1.2.23 =
|
370 |
+
* Allow dynamic row height in the rows by category in the week view
|
371 |
|
372 |
+
= 1.2.24 =
|
373 |
+
* Fixed the dynamic row height in Multi-column day view.
|
374 |
|
375 |
+
= 1.2.25 =
|
376 |
+
* CSS update to fix the time color in the week view
|
377 |
|
378 |
+
= 1.2.26 =
|
379 |
+
* Fixed the dynamic row height in Multi-column week view.
|
380 |
+
|
381 |
+
= 1.2.27 =
|
382 |
+
* Tested in WP 4.5
|
383 |
+
* Fixed bug related to the recurrent events in the february 28
|
384 |
+
|
385 |
+
= 1.2.28 =
|
386 |
+
* Lang update for recurrent events
|
387 |
+
|
388 |
+
= 1.2.29 =
|
389 |
+
* Added new script load method
|
390 |
+
|
391 |
+
= 1.2.30 =
|
392 |
+
* Fixed bug related to initialization in the event edition's colorpicker
|
393 |
+
|
394 |
+
= 1.2.31 =
|
395 |
+
* Moved old changelogs to external file
|
396 |
+
|
397 |
+
= 1.2.32 =
|
398 |
+
* New init hooks
|
399 |
+
|
400 |
+
= 1.2.33 =
|
401 |
+
* Calendar improvement to minimize plugin conflicts
|
402 |
+
|
403 |
+
= 1.2.34 =
|
404 |
+
* Removed old versions of the calendar
|
405 |
+
|
406 |
+
= 1.2.35 =
|
407 |
+
* Fixed bug in encoding of calendar params
|
408 |
+
|
409 |
+
= 1.2.36 =
|
410 |
+
* Fixed bug related to the auto heigh into the day and week view
|
411 |
+
|
412 |
+
= 1.2.37 =
|
413 |
+
* New support addr and tracking param
|
414 |
+
|
415 |
+
= 1.2.38 =
|
416 |
+
* CSS update to fix the time color in the day view
|
417 |
+
|
418 |
+
= 1.2.39 =
|
419 |
+
* Fixed bug in the week view to avoid a conflic with the CSS theme
|
420 |
+
|
421 |
+
= 1.2.40 =
|
422 |
+
* Added alternative script load methods
|
423 |
+
|
424 |
+
= 1.2.41 =
|
425 |
+
* Improved language auto-detection
|
426 |
+
|
427 |
+
= 1.2.42 =
|
428 |
+
* New page for custom requests
|
429 |
+
|
430 |
+
= 1.2.43 =
|
431 |
+
* Polish language update
|
432 |
+
|
433 |
+
= 1.2.44 =
|
434 |
+
* Compatible with WP 4.6
|
435 |
+
|
436 |
+
= 1.2.45 =
|
437 |
+
* New custom request form
|
438 |
+
|
439 |
+
= 1.2.46 =
|
440 |
+
Fixed bug in the ndays view related to the cells of the calendar getting out of the borders
|
441 |
+
|
442 |
+
= 1.2.47 =
|
443 |
+
Fixed bug related to recurrent events in the rrule file
|
444 |
+
|
445 |
+
= 1.2.48 =
|
446 |
+
Fixed bug related to nDays view.
|
447 |
|
448 |
== Upgrade Notice ==
|
449 |
|
450 |
+
= 1.2.48 =
|
451 |
+
Fixed bug related to nDays view.
|
452 |
+
|
453 |
+
Important note: If you are using the Professional version don't update via the WP dashboard but using your personal update link. Contact us if you need further information: http://wordpress.dwbooster.com/support
|
captcha/captcha.php
DELETED
@@ -1,173 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/*
|
3 |
-
PHP Captcha by Codepeople.net
|
4 |
-
http://www.codepeople.net
|
5 |
-
*/
|
6 |
-
|
7 |
-
if (!ini_get("zlib.output_compression")) ob_clean();
|
8 |
-
|
9 |
-
if (!isset($_GET["ps"])) $_GET["ps"] = '';
|
10 |
-
|
11 |
-
if ($_GET["hdwtest"] == "sessiontest")
|
12 |
-
{
|
13 |
-
session_start();
|
14 |
-
session_register("tmpvar");
|
15 |
-
if ($_GET["autocall"]!=1){
|
16 |
-
$_SESSION["tmpvar"] = "ok";
|
17 |
-
} else {
|
18 |
-
if ($_SESSION["tmpvar"]!="ok") {
|
19 |
-
die("Session Error");
|
20 |
-
} else {
|
21 |
-
die("Sessions works on your server!");
|
22 |
-
}
|
23 |
-
}
|
24 |
-
header("Location: ".$PHP_SELF."?hdwtest=sessiontest&autocall=1" );
|
25 |
-
exit;
|
26 |
-
}
|
27 |
-
|
28 |
-
if ($_GET["width"] == '' || !is_numeric($_GET["width"])) $_GET["width"] = "180";
|
29 |
-
if ($_GET["height"] == '' || !is_numeric($_GET["height"])) $_GET["height"] = "60";
|
30 |
-
if ($_GET["letter_count"] == ''|| !is_numeric($_GET["letter_count"])) $_GET["letter_count"] = "5";
|
31 |
-
if ($_GET["min_size"] == ''|| !is_numeric($_GET["min_size"])) $_GET["min_size"] = "35";
|
32 |
-
if ($_GET["max_size"] == ''|| !is_numeric($_GET["max_size"])) $_GET["max_size"] = "45";
|
33 |
-
if ($_GET["noise"] == ''|| !is_numeric($_GET["noise"])) $_GET["noise"] = "200";
|
34 |
-
if ($_GET["noiselength"] == ''|| !is_numeric($_GET["noiselength"])) $_GET["noiselength"] = "5";
|
35 |
-
if ($_GET["bcolor"] == '') $_GET["bcolor"] = "FFFFFF";
|
36 |
-
if ($_GET["border"] == '') $_GET["border"] = "000000";
|
37 |
-
|
38 |
-
//configuration
|
39 |
-
$imgX = $_GET["width"];
|
40 |
-
$imgY = $_GET["height"];
|
41 |
-
|
42 |
-
$letter_count = $_GET["letter_count"];
|
43 |
-
$min_size = $_GET["min_size"];
|
44 |
-
$max_size = $_GET["max_size"];
|
45 |
-
$noise = $_GET["noise"];
|
46 |
-
$noiselength = $_GET["noiselength"];
|
47 |
-
$bcolor = cpcff_decodeColor($_GET["bcolor"]);
|
48 |
-
$border = cpcff_decodeColor($_GET["border"]);
|
49 |
-
|
50 |
-
$noisecolor = 0xcdcdcd;
|
51 |
-
$random_noise_color= true;
|
52 |
-
$tcolor = cpcff_decodeColor("666666");
|
53 |
-
$random_text_color= true;
|
54 |
-
|
55 |
-
|
56 |
-
header("Cache-Control: no-store, no-cache, must-revalidate");
|
57 |
-
header("Pragma: no-cache");
|
58 |
-
|
59 |
-
function cpcff_decodeColor($hexcolor)
|
60 |
-
{
|
61 |
-
$color = hexdec($hexcolor);
|
62 |
-
$c["b"] = $color % 256;
|
63 |
-
$color = $color / 256;
|
64 |
-
$c["g"] = $color % 256;
|
65 |
-
$color = $color / 256;
|
66 |
-
$c["r"] = $color % 256;
|
67 |
-
return $c;
|
68 |
-
}
|
69 |
-
|
70 |
-
function cpcff_similarColors($c1, $c2)
|
71 |
-
{
|
72 |
-
return sqrt( pow($c1["r"]-$c2["r"],2) + pow($c1["g"]-$c2["g"],2) + pow($c1["b"]-$c2["b"],2)) < 125;
|
73 |
-
}
|
74 |
-
|
75 |
-
|
76 |
-
// USAGE
|
77 |
-
// if (empty($_POST['hdcaptcha']) || $_POST['hdcaptcha'] != $_SESSION['rand_code']) header("Location: /form.html");
|
78 |
-
|
79 |
-
if (function_exists('session_start')) @session_start();
|
80 |
-
|
81 |
-
function cpcff_make_seed() {
|
82 |
-
list($usec, $sec) = explode(' ', microtime());
|
83 |
-
return (float) $sec + ((float) $usec * 100000);
|
84 |
-
}
|
85 |
-
mt_srand(cpcff_make_seed());
|
86 |
-
$randval = mt_rand();
|
87 |
-
|
88 |
-
$str = "";
|
89 |
-
$length = 0;
|
90 |
-
for ($i = 0; $i < $letter_count; $i++) {
|
91 |
-
$str .= chr(mt_rand(97, 122))." ";
|
92 |
-
}
|
93 |
-
$_SESSION['rand_code'.$_GET["ps"]] = str_replace(" ", "", $str);
|
94 |
-
|
95 |
-
setCookie('rand_code'.$_GET["ps"], md5(str_replace(" ", "", $str)), time()+36000,"/");
|
96 |
-
|
97 |
-
$image = imagecreatetruecolor($imgX, $imgY);
|
98 |
-
$backgr_col = imagecolorallocate($image, $bcolor["r"],$bcolor["g"],$bcolor["b"]);
|
99 |
-
$border_col = imagecolorallocate($image, $border["r"],$border["g"],$border["b"]);
|
100 |
-
|
101 |
-
if ($random_text_color)
|
102 |
-
{
|
103 |
-
do
|
104 |
-
{
|
105 |
-
$selcolor = mt_rand(0,256*256*256);
|
106 |
-
} while ( cpcff_similarColors(cpcff_decodeColor($selcolor), $bcolor) );
|
107 |
-
$tcolor = cpcff_decodeColor($selcolor);
|
108 |
-
}
|
109 |
-
|
110 |
-
$text_col = imagecolorallocate($image, $tcolor["r"],$tcolor["g"],$tcolor["b"]);
|
111 |
-
|
112 |
-
imagefilledrectangle($image, 0, 0, $imgX, $imgY, $backgr_col);
|
113 |
-
imagerectangle($image, 0, 0, $imgX-1, $imgY-1, $border_col);
|
114 |
-
for ($i=0;$i<$noise;$i++)
|
115 |
-
{
|
116 |
-
if ($random_noise_color)
|
117 |
-
$color = mt_rand(0, 256*256*256);
|
118 |
-
else
|
119 |
-
$color = $noisecolor;
|
120 |
-
$x1 = mt_rand(2,$imgX-2);
|
121 |
-
$y1 = mt_rand(2,$imgY-2);
|
122 |
-
imageline ( $image, $x1, $y1, mt_rand($x1-$noiselength,$x1+$noiselength), mt_rand($y1-$noiselength,$y1+$noiselength), $color);
|
123 |
-
}
|
124 |
-
|
125 |
-
$font = dirname( __FILE__ ) . "/font-1.ttf"; // font
|
126 |
-
if ($_GET["font"]) $font = dirname( __FILE__ ) . "/".$_GET["font"];
|
127 |
-
/**if (!file_exists($font))
|
128 |
-
$font = $_SERVER["DOCUMENT_ROOT"]."/HDWFormCaptcha/".$font;
|
129 |
-
if (!file_exists($font))
|
130 |
-
$font = dirname(__FILE__)."/".$font;
|
131 |
-
*/
|
132 |
-
|
133 |
-
$font_size = rand($min_size, $max_size);
|
134 |
-
|
135 |
-
$angle = rand(-15, 15);
|
136 |
-
|
137 |
-
if (function_exists("imagettfbbox") && function_exists("imagettftext"))
|
138 |
-
{
|
139 |
-
$box = imagettfbbox($font_size, $angle, $font, $str);
|
140 |
-
$x = (int)($imgX - $box[4]) / 2;
|
141 |
-
$y = (int)($imgY - $box[5]) / 2;
|
142 |
-
imagettftext($image, $font_size, $angle, $x, $y, $text_col, $font, $str);
|
143 |
-
}
|
144 |
-
else if (function_exists("imageFtBBox") && function_exists("imageFTText"))
|
145 |
-
{
|
146 |
-
$box = imageFtBBox($font_size, $angle, $font, $str);
|
147 |
-
$x = (int)($imgX - $box[4]) / 2;
|
148 |
-
$y = (int)($imgY - $box[5]) / 2;
|
149 |
-
imageFTText ($image, $font_size, $angle, $x, $y, $text_col, $font, $str);
|
150 |
-
}
|
151 |
-
else
|
152 |
-
{
|
153 |
-
$angle = 0;
|
154 |
-
$font = 6;
|
155 |
-
$wf = ImageFontWidth(6) * strlen($str);
|
156 |
-
$hf = ImageFontHeight(6);
|
157 |
-
$x = (int)($imgX - $wf) / 2;
|
158 |
-
$y = (int)($imgY - $hf) / 2;
|
159 |
-
imagestring ( $image, $font, $x, $y, $str, $text_col);
|
160 |
-
}
|
161 |
-
|
162 |
-
function ppp_output_handler($img) {
|
163 |
-
header('Content-type: image/png');
|
164 |
-
header('Content-Length: ' . strlen($img));
|
165 |
-
return $img;
|
166 |
-
}
|
167 |
-
|
168 |
-
ob_start("ppp_output_handler");
|
169 |
-
imagepng($image);
|
170 |
-
ob_end_flush();
|
171 |
-
imagedestroy ($image);
|
172 |
-
exit;
|
173 |
-
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
captcha/font-1.ttf
DELETED
Binary file
|
captcha/font-2.ttf
DELETED
Binary file
|
captcha/font-3.ttf
DELETED
Binary file
|
captcha/font-4.ttf
DELETED
Binary file
|
changelog.txt
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
== OLD Changelog Entries ==
|
2 |
+
|
3 |
+
= 1.0 =
|
4 |
+
* First stable version released.
|
5 |
+
* More configuration options added.
|
6 |
+
|
classes/cp-base-class.inc.php
ADDED
@@ -0,0 +1,86 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
|
4 |
+
class CP_BaseClass {
|
5 |
+
|
6 |
+
/** installation functions */
|
7 |
+
public function install($networkwide) {
|
8 |
+
global $wpdb;
|
9 |
+
|
10 |
+
if (function_exists('is_multisite') && is_multisite()) {
|
11 |
+
// check if it is a network activation - if so, run the activation function for each blog id
|
12 |
+
if ($networkwide) {
|
13 |
+
$old_blog = $wpdb->blogid;
|
14 |
+
// Get all blog ids
|
15 |
+
$blogids = $wpdb->get_col($wpdb->prepare("SELECT blog_id FROM $wpdb->blogs"));
|
16 |
+
foreach ($blogids as $blog_id) {
|
17 |
+
switch_to_blog($blog_id);
|
18 |
+
$this->_install();
|
19 |
+
}
|
20 |
+
switch_to_blog($old_blog);
|
21 |
+
return;
|
22 |
+
}
|
23 |
+
}
|
24 |
+
$this->_install();
|
25 |
+
}
|
26 |
+
|
27 |
+
function get_param($key)
|
28 |
+
{
|
29 |
+
if (isset($_GET[$key]) && $_GET[$key] != '')
|
30 |
+
return $_GET[$key];
|
31 |
+
else if (isset($_POST[$key]) && $_POST[$key] != '')
|
32 |
+
return $_POST[$key];
|
33 |
+
else
|
34 |
+
return '';
|
35 |
+
}
|
36 |
+
|
37 |
+
function is_administrator()
|
38 |
+
{
|
39 |
+
return current_user_can('manage_options');
|
40 |
+
}
|
41 |
+
|
42 |
+
function get_site_url($admin = false)
|
43 |
+
{
|
44 |
+
$blog = get_current_blog_id();
|
45 |
+
if( $admin )
|
46 |
+
$url = get_admin_url( $blog );
|
47 |
+
else
|
48 |
+
$url = get_home_url( $blog );
|
49 |
+
|
50 |
+
$url = parse_url($url);
|
51 |
+
return rtrim(@$url["path"],"/");
|
52 |
+
}
|
53 |
+
|
54 |
+
|
55 |
+
function get_FULL_site_url($admin = false)
|
56 |
+
{
|
57 |
+
$blog = get_current_blog_id();
|
58 |
+
if( $admin )
|
59 |
+
$url = get_admin_url( $blog );
|
60 |
+
else
|
61 |
+
$url = get_home_url( $blog );
|
62 |
+
|
63 |
+
$url = parse_url($url);
|
64 |
+
$url = rtrim($url["path"],"/");
|
65 |
+
$pos = strpos($url, "://");
|
66 |
+
if ($pos === false)
|
67 |
+
$url = 'http://'.$_SERVER["HTTP_HOST"].$url;
|
68 |
+
return $url;
|
69 |
+
}
|
70 |
+
|
71 |
+
function add_field_verify ($table, $field, $type = "text")
|
72 |
+
{
|
73 |
+
global $wpdb;
|
74 |
+
$results = $wpdb->get_results("SHOW columns FROM `".$table."` where field='".$field."'");
|
75 |
+
if (!count($results))
|
76 |
+
{
|
77 |
+
$sql = "ALTER TABLE `".$table."` ADD `".$field."` ".$type;
|
78 |
+
$wpdb->query($sql);
|
79 |
+
return true;
|
80 |
+
}
|
81 |
+
return false;
|
82 |
+
}
|
83 |
+
|
84 |
+
} // end class
|
85 |
+
|
86 |
+
?>
|
cp-admin-int-list.inc.php
ADDED
@@ -0,0 +1,198 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
if ( !is_admin() )
|
4 |
+
{
|
5 |
+
echo 'Direct access not allowed.';
|
6 |
+
exit;
|
7 |
+
}
|
8 |
+
|
9 |
+
$current_user = wp_get_current_user();
|
10 |
+
|
11 |
+
global $wpdb;
|
12 |
+
$message = "";
|
13 |
+
if (isset($_GET['u']) && $_GET['u'] != '')
|
14 |
+
{
|
15 |
+
$wpdb->query('UPDATE `'.$wpdb->prefix.'dc_mv_calendars` SET title="'.esc_sql(strip_tags($_GET["name"])).'",published='.intval($_GET["public"]).',owner="'.esc_sql(strip_tags($_GET["owner"])).'" WHERE id='.intval($_GET['u']));
|
16 |
+
$message = "Item updated";
|
17 |
+
}
|
18 |
+
else if (isset($_GET['scr']) && $_GET['scr'] != '')
|
19 |
+
{
|
20 |
+
update_option( 'CP_MVC_LOAD_SCRIPTS', ($_GET["scr"]=="1"?"1":"2") );
|
21 |
+
$message = "Troubleshoot settings updated";
|
22 |
+
}
|
23 |
+
|
24 |
+
|
25 |
+
if ($message) echo "<div id='setting-error-settings_updated' class='updated settings-error'><p><strong>".$message."</strong></p></div>";
|
26 |
+
|
27 |
+
?>
|
28 |
+
<div class="wrap">
|
29 |
+
<h1><?php echo $this->plugin_name; ?></h1>
|
30 |
+
|
31 |
+
<script type="text/javascript">
|
32 |
+
function cp_updateItem(id)
|
33 |
+
{
|
34 |
+
var calname = document.getElementById("calname_"+id).value;
|
35 |
+
var owner = document.getElementById("calowner_"+id).options[document.getElementById("calowner_"+id).options.selectedIndex].value;
|
36 |
+
if (owner == '')
|
37 |
+
owner = 0;
|
38 |
+
var is_public = (document.getElementById("calpublic_"+id).checked?"1":"0");
|
39 |
+
document.location = 'admin.php?page=<?php echo $this->menu_parameter; ?>_manage&u='+id+'&r='+Math.random()+'&public='+is_public+'&owner='+owner+'&name='+encodeURIComponent(calname);
|
40 |
+
}
|
41 |
+
|
42 |
+
function cp_manageSettings(id)
|
43 |
+
{
|
44 |
+
document.location = 'admin.php?page=<?php echo $this->menu_parameter; ?>_manage&cpmvc_id='+id+'&r='+Math.random();
|
45 |
+
}
|
46 |
+
|
47 |
+
function cp_deleteItem(id)
|
48 |
+
{
|
49 |
+
alert('Feature not available in free version since this version supports one calendar.');
|
50 |
+
}
|
51 |
+
|
52 |
+
function cp_cloneItem(id)
|
53 |
+
{
|
54 |
+
alert('Feature not available in free version since this version supports one calendar.');
|
55 |
+
}
|
56 |
+
|
57 |
+
function cp_updateConfig()
|
58 |
+
{
|
59 |
+
if (confirm('Are you sure that you want to update these settings?'))
|
60 |
+
{
|
61 |
+
var scr = document.getElementById("ccscriptload").value;
|
62 |
+
document.location = 'admin.php?page=<?php echo $this->menu_parameter; ?>_manage&scr='+scr+'&r='+Math.random();
|
63 |
+
}
|
64 |
+
}
|
65 |
+
|
66 |
+
</script>
|
67 |
+
|
68 |
+
|
69 |
+
<div id="normal-sortables" class="meta-box-sortables">
|
70 |
+
|
71 |
+
<div id="metabox_basic_settings" class="postbox" >
|
72 |
+
<h3 class='hndle' style="padding:5px;"><span>Instructions</span></h3>
|
73 |
+
<div class="inside">
|
74 |
+
|
75 |
+
<p><span style="font-weight:bold;color:#ff3333">To insert a calendar into a page or post</span>, go to the <strong>edition of the page/post</strong> and use the box named "<strong>CP Multi View Calendar</strong>" below the edition area.</p>
|
76 |
+
|
77 |
+
<p>In that area you can create a new view and when ready sent the shortcode to the editor through the button included for that purpose.</p>
|
78 |
+
|
79 |
+
<p><span style="font-weight:bold;color:#ff3333">To add events to the calendar</span> click the "<strong>Admin Calendar Data</strong>" button below that leads to a page where you can add/edit/delete events on the calendar (just click over the desired dates).</p>
|
80 |
+
|
81 |
+
<p><strong>Want to help to the development of this plugin?</strong> The main features of this plugin are provided free of charge. We need your help to continue developing it and adding new features. If you want to help with the development please <a href="https://wordpress.org/support/view/plugin-reviews/cp-multi-view-calendar?rate=5#postform" style="color:#0000ff;font-weight:bold;">add a review to support it</a>. Thank you!</p>
|
82 |
+
</div>
|
83 |
+
</div>
|
84 |
+
|
85 |
+
<div id="metabox_basic_settings" class="postbox" >
|
86 |
+
<h3 class='hndle' style="padding:5px;"><span>Calendar List / Items List</span></h3>
|
87 |
+
<div class="inside">
|
88 |
+
|
89 |
+
|
90 |
+
<table cellspacing="5">
|
91 |
+
<tr>
|
92 |
+
<th align="left">Calendar Name</th><th align="left">User</th><th align="left"> Published?</th><th align="left"> Options</th>
|
93 |
+
</tr>
|
94 |
+
<?php
|
95 |
+
$users = $wpdb->get_results( "SELECT user_login,ID FROM ".$wpdb->users." ORDER BY ID DESC" );
|
96 |
+
$myrows = $wpdb->get_results( "SELECT * FROM ". $wpdb->prefix."dc_mv_calendars");
|
97 |
+
foreach ($myrows as $item)
|
98 |
+
if ($this->is_administrator() || ($current_user->ID == $item->owner))
|
99 |
+
{
|
100 |
+
?>
|
101 |
+
<tr>
|
102 |
+
<td nowrap><input <?php if (!$this->is_administrator()) echo ' readonly '; ?> type="text" name="calname_<?php echo $item->id; ?>" id="calname_<?php echo $item->id; ?>" value="<?php echo esc_attr($item->title); ?>" /></td>
|
103 |
+
<?php if ($this->is_administrator()) { ?>
|
104 |
+
<td nowrap>
|
105 |
+
<select name="calowner_<?php echo $item->id; ?>" id="calowner_<?php echo $item->id; ?>">
|
106 |
+
<option value="0"<?php if (!$item->owner) echo ' selected'; ?>></option>
|
107 |
+
<?php foreach ($users as $user) {
|
108 |
+
?>
|
109 |
+
<option value="<?php echo $user->ID; ?>"<?php if ($user->ID."" == $item->owner) echo ' selected'; ?>><?php echo $user->user_login; ?></option>
|
110 |
+
<?php } ?>
|
111 |
+
</select>
|
112 |
+
</td>
|
113 |
+
<?php } else { ?>
|
114 |
+
<td nowrap>
|
115 |
+
<?php echo $current_user->user_login; ?>
|
116 |
+
</td>
|
117 |
+
<?php } ?>
|
118 |
+
<?php if ($this->is_administrator()) { ?>
|
119 |
+
<td nowrap> <input type="checkbox" name="calpublic_<?php echo $item->id; ?>" id="calpublic_<?php echo $item->id; ?>" value="1" <?php if ($item->published) echo " checked "; ?> /></td>
|
120 |
+
<?php } ?>
|
121 |
+
<td nowrap>
|
122 |
+
<?php if ($this->is_administrator()) { ?>
|
123 |
+
<input type="button" name="calupdate_<?php echo $item->id; ?>" value="Update" onclick="cp_updateItem(<?php echo $item->id; ?>);" />
|
124 |
+
<?php } ?>
|
125 |
+
<input type="button" name="calmanage_<?php echo $item->id; ?>" value="Admin Calendar Data" onclick="cp_manageSettings(<?php echo $item->id; ?>);" />
|
126 |
+
<!-- <input type="button" name="calmanage_<?php echo $item->id; ?>" value="Export to ICal" onclick="alert('This feature is only available in the professional or developer version');" /> -->
|
127 |
+
<?php if ($this->is_administrator()) { ?>
|
128 |
+
<input type="button" name="calclone_<?php echo $item->id; ?>" value="Clone" onclick="cp_cloneItem(<?php echo $item->id; ?>);" />
|
129 |
+
<input type="button" name="caldelete_<?php echo $item->id; ?>" value="Delete" onclick="cp_deleteItem(<?php echo $item->id; ?>);" /></td>
|
130 |
+
<?php } ?>
|
131 |
+
</tr>
|
132 |
+
<?php
|
133 |
+
}
|
134 |
+
?>
|
135 |
+
|
136 |
+
</table>
|
137 |
+
|
138 |
+
|
139 |
+
|
140 |
+
</div>
|
141 |
+
</div>
|
142 |
+
|
143 |
+
|
144 |
+
<?php if ($this->is_administrator()) { ?>
|
145 |
+
<div id="metabox_basic_settings" class="postbox" >
|
146 |
+
<h3 class='hndle' style="padding:5px;"><span>New Calendar / Item</span></h3>
|
147 |
+
<div class="inside">
|
148 |
+
|
149 |
+
* Pro version supports multiple calendars. <a href="http://wordpress.dwbooster.com/calendars/cp-multi-view-calendar#download">Click here for details</a>.
|
150 |
+
|
151 |
+
</div>
|
152 |
+
</div>
|
153 |
+
<?php } ?>
|
154 |
+
|
155 |
+
<div id="metabox_basic_settings" class="postbox" >
|
156 |
+
<h3 class='hndle' style="padding:5px;"><span>Troubleshoot Area</span></h3>
|
157 |
+
<div class="inside">
|
158 |
+
<p><strong>Important!</strong>: Use this area <strong>only</strong> if you are experiencing conflicts with third party plugins or if the calendar doesn't appear in the public page.</p>
|
159 |
+
<form name="updatesettings">
|
160 |
+
|
161 |
+
Script load method:<br />
|
162 |
+
<select id="ccscriptload" name="ccscriptload">
|
163 |
+
<option value="1" <?php if (get_option('CP_MVC_LOAD_SCRIPTS',"0") == "1") echo 'selected'; ?>>Classic (Recommended)</option>
|
164 |
+
<option value="2" <?php if (get_option('CP_MVC_LOAD_SCRIPTS',"0") != "1") echo 'selected'; ?>>Direct</option>
|
165 |
+
</select><br />
|
166 |
+
<em>* Change the script load method if the calendar doesn't appear in the public website or if there are conflicts
|
167 |
+
with other plugins.</em>
|
168 |
+
|
169 |
+
|
170 |
+
<br /><br />
|
171 |
+
<input type="button" onclick="cp_updateConfig();" name="gobtn" value="UPDATE" />
|
172 |
+
<br /><br />
|
173 |
+
</form>
|
174 |
+
|
175 |
+
</div>
|
176 |
+
</div>
|
177 |
+
|
178 |
+
|
179 |
+
</div>
|
180 |
+
|
181 |
+
|
182 |
+
[<a href="http://wordpress.dwbooster.com/support?ref=dashboard" target="_blank">Request Custom Modifications</a>] | [<a href="http://wordpress.dwbooster.com/calendars/cp-appointment-calendar" target="_blank">Help</a>]
|
183 |
+
</form>
|
184 |
+
</div>
|
185 |
+
|
186 |
+
|
187 |
+
|
188 |
+
|
189 |
+
|
190 |
+
|
191 |
+
|
192 |
+
|
193 |
+
|
194 |
+
|
195 |
+
|
196 |
+
|
197 |
+
|
198 |
+
|
cp-admin-int.inc.php
ADDED
@@ -0,0 +1,120 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
if ( !is_admin() )
|
4 |
+
{
|
5 |
+
echo 'Direct access not allowed.';
|
6 |
+
exit;
|
7 |
+
}
|
8 |
+
|
9 |
+
$mycalendarrows = $wpdb->get_results( 'SELECT * FROM '.$wpdb->prefix.'dc_mv_calendars WHERE id='.intval($this->calendar));
|
10 |
+
|
11 |
+
?>
|
12 |
+
<div class="wrap">
|
13 |
+
<h1><?php echo $this->plugin_name; ?> - Manage Data and Settings</h1>
|
14 |
+
|
15 |
+
<input type="button" name="backbtn" value="Back to items list..." onclick="document.location='admin.php?page=<?php echo $this->menu_parameter; ?>_manage';">
|
16 |
+
|
17 |
+
<form method="post" action="" name="cpformconf">
|
18 |
+
<input name="cpmvc_do_action" type="hidden" id="save_settings" />
|
19 |
+
<input name="cpmvc_id" type="hidden" value="<?php echo $this->calendar; ?>" />
|
20 |
+
|
21 |
+
|
22 |
+
|
23 |
+
<div id="normal-sortables" class="meta-box-sortables">
|
24 |
+
|
25 |
+
<hr />
|
26 |
+
<h3>These settings apply only to: <?php echo htmlentities ($mycalendarrows[0]->title); ?></h3>
|
27 |
+
|
28 |
+
<div id="metabox_basic_settings" class="postbox" >
|
29 |
+
<h3 class='hndle' style="padding:5px;"><span>Calendar Configuration / Administration</span></h3>
|
30 |
+
<div class="inside">
|
31 |
+
|
32 |
+
<link rel="stylesheet" href="<?php echo plugins_url('DC_MultiViewCal/css/cupertino/calendar.css', __FILE__); ?>" type="text/css" />
|
33 |
+
<link rel="stylesheet" href="<?php echo plugins_url('DC_MultiViewCal/css/main.css', __FILE__); ?>" type="text/css" />
|
34 |
+
|
35 |
+
<script type="text/javascript" src="<?php echo plugins_url('DC_MultiViewCal/src/Plugins/underscore.js', __FILE__); ?>"></script>
|
36 |
+
<script type="text/javascript" src="<?php echo plugins_url('DC_MultiViewCal/src/Plugins/rrule.js', __FILE__); ?>"></script>
|
37 |
+
<script type="text/javascript" src="<?php echo plugins_url('DC_MultiViewCal/src/Plugins/Common.js', __FILE__); ?>"></script>
|
38 |
+
<script type="text/javascript" src="<?php
|
39 |
+
if (file_exists(dirname( __FILE__ ).'/DC_MultiViewCal/language/multiview_lang_'.$this->_autodetect_language().'.js'))
|
40 |
+
echo plugins_url('DC_MultiViewCal/language/multiview_lang_'.$this->_autodetect_language().'.js', __FILE__ );
|
41 |
+
else
|
42 |
+
echo plugins_url('DC_MultiViewCal/language/multiview_lang_en_GB.js', __FILE__ );
|
43 |
+
?>"></script>
|
44 |
+
<script type="text/javascript" src="<?php echo plugins_url('DC_MultiViewCal/src/Plugins/jquery.calendar.js', __FILE__); ?>"></script>
|
45 |
+
<script type="text/javascript" src="<?php echo plugins_url('DC_MultiViewCal/src/Plugins/jquery.alert.js', __FILE__); ?>"></script>
|
46 |
+
<script type="text/javascript" src="<?php echo plugins_url('DC_MultiViewCal/src/Plugins/multiview.js', __FILE__); ?>"></script>
|
47 |
+
<script type="text/javascript">
|
48 |
+
var pathCalendar = "<?php echo $this->get_site_url(); ?>/?cpmvc_id=<?php echo $this->calendar; ?>&cpmvc_do_action=mvparse";
|
49 |
+
dc_subjects = "";dc_locations = "";
|
50 |
+
initMultiViewCal("cal<?php echo $this->calendar; ?>", <?php echo $this->calendar; ?>,
|
51 |
+
{viewDay:true,
|
52 |
+
viewWeek:true,
|
53 |
+
viewMonth:true,
|
54 |
+
viewNMonth:true,
|
55 |
+
viewdefault:"nMonth",
|
56 |
+
numberOfMonths:12,
|
57 |
+
showtooltip:false,
|
58 |
+
tooltipon:1,
|
59 |
+
shownavigate:false,
|
60 |
+
url:"",
|
61 |
+
target:0,
|
62 |
+
start_weekday:0,
|
63 |
+
language:"en-GB",
|
64 |
+
cssStyle:"cupertino",
|
65 |
+
edition:true,
|
66 |
+
btoday:true,
|
67 |
+
bnavigation:true,
|
68 |
+
brefresh:true,
|
69 |
+
bnew:true,
|
70 |
+
path:pathCalendar,
|
71 |
+
userAdd:true,
|
72 |
+
userEdit:true,
|
73 |
+
userDel:true,
|
74 |
+
userEditOwner:true,
|
75 |
+
userDelOwner:true,
|
76 |
+
userOwner:-1 , palette:0, paletteDefault:"F00"});
|
77 |
+
</script>
|
78 |
+
|
79 |
+
<div id="multicalendar"><div id="cal<?php echo $this->calendar; ?>" class="multicalendar"></div></div>
|
80 |
+
|
81 |
+
<div style="clear:both;height:20px" ></div>
|
82 |
+
|
83 |
+
</div>
|
84 |
+
</div>
|
85 |
+
|
86 |
+
|
87 |
+
|
88 |
+
<div id="metabox_basic_settings" class="postbox" >
|
89 |
+
<h3 class='hndle' style="padding:5px;"><span>Instructions</span></h3>
|
90 |
+
<div class="inside">
|
91 |
+
|
92 |
+
<p>To insert a calendar into a page or post, go to the <strong>edition of the page/post</strong> and use the box named "<strong>CP Multi View Calendar</strong>" below the edition area.</p>
|
93 |
+
|
94 |
+
<p>In that area you can create a new view and when ready sent the shortcode to the editor through the button included for that purpose.</p>
|
95 |
+
|
96 |
+
<p>Note: Use the above section only to manage the calendar's data.</p>
|
97 |
+
|
98 |
+
</div>
|
99 |
+
</div>
|
100 |
+
|
101 |
+
|
102 |
+
|
103 |
+
|
104 |
+
[<a href="http://wordpress.dwbooster.com/support?ref=dashboard" target="_blank">Request Custom Modifications</a>] | [<a href="<?php echo $this->plugin_URL; ?>" target="_blank">Help</a>]
|
105 |
+
</form>
|
106 |
+
</div>
|
107 |
+
|
108 |
+
|
109 |
+
|
110 |
+
|
111 |
+
|
112 |
+
|
113 |
+
|
114 |
+
|
115 |
+
|
116 |
+
|
117 |
+
|
118 |
+
|
119 |
+
|
120 |
+
|
cp-main-class.inc.php
ADDED
@@ -0,0 +1,661 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class CP_MultiViewCalendar extends CP_BaseClass {
|
4 |
+
|
5 |
+
private $calendar = 1;
|
6 |
+
private $menu_parameter = 'cp_multiview';
|
7 |
+
private $plugin_name = 'CP Multi View Calendar';
|
8 |
+
private $prefix = 'cp_multiview';
|
9 |
+
private $plugin_URL = 'http://wordpress.dwbooster.com/calendars/cp-multi-view-calendar';
|
10 |
+
private $print_counter = 0;
|
11 |
+
private $ajax_nonce;
|
12 |
+
|
13 |
+
public $shorttag = 'CPMV_CALENDAR';
|
14 |
+
|
15 |
+
function __construct()
|
16 |
+
{
|
17 |
+
if ( is_admin() ) {
|
18 |
+
add_action('wp_ajax_'.$this->prefix.'add_calendar', array($this,'ajax_add_calendar'));
|
19 |
+
add_action('wp_ajax_'.$this->prefix.'delete_calendar', array($this,'ajax_delete_calendar'));
|
20 |
+
add_action('wp_ajax_'.$this->prefix.'get_views', array($this,'ajax_get_views'));
|
21 |
+
}
|
22 |
+
}
|
23 |
+
|
24 |
+
function _install() {
|
25 |
+
global $wpdb;
|
26 |
+
require_once(ABSPATH . 'wp-admin/includes/upgrade.php');
|
27 |
+
|
28 |
+
$sql = "CREATE TABLE IF NOT EXISTS ".$wpdb->prefix."dc_mv_calendars (
|
29 |
+
id int(11) unsigned NOT NULL AUTO_INCREMENT,
|
30 |
+
title text,
|
31 |
+
permissions text,
|
32 |
+
owner int(11) default '0',
|
33 |
+
ordering int(11) NOT NULL default '0',
|
34 |
+
published tinyint(1) NOT NULL default '0',
|
35 |
+
checked_out int(11) NOT NULL default '0',
|
36 |
+
checked_out_time datetime NOT NULL default '0000-00-00 00:00:00',
|
37 |
+
PRIMARY KEY (id)
|
38 |
+
);
|
39 |
+
";
|
40 |
+
$wpdb->query($sql);
|
41 |
+
|
42 |
+
$sql = "CREATE TABLE IF NOT EXISTS ".$wpdb->prefix."dc_mv_events (
|
43 |
+
id int(10) unsigned NOT NULL AUTO_INCREMENT,
|
44 |
+
calid int(10) unsigned DEFAULT NULL,
|
45 |
+
starttime datetime DEFAULT NULL,
|
46 |
+
endtime datetime DEFAULT NULL,
|
47 |
+
title varchar(250) DEFAULT NULL,
|
48 |
+
location varchar(250) DEFAULT NULL,
|
49 |
+
rrule varchar(255) DEFAULT NULL,
|
50 |
+
exdate text,
|
51 |
+
uid int(11),
|
52 |
+
description mediumtext,
|
53 |
+
isalldayevent tinyint(3) unsigned DEFAULT NULL,
|
54 |
+
color varchar(10) DEFAULT NULL,
|
55 |
+
owner int(11),
|
56 |
+
published tinyint(1),
|
57 |
+
PRIMARY KEY (id)
|
58 |
+
);
|
59 |
+
";
|
60 |
+
$wpdb->query($sql);
|
61 |
+
|
62 |
+
$sql = "CREATE TABLE IF NOT EXISTS ".$wpdb->prefix."dc_mv_configuration (
|
63 |
+
id int(10) unsigned NOT NULL AUTO_INCREMENT,
|
64 |
+
palettes text,
|
65 |
+
administration text,
|
66 |
+
PRIMARY KEY (id)
|
67 |
+
);
|
68 |
+
";
|
69 |
+
$wpdb->query($sql);
|
70 |
+
|
71 |
+
$sql = "CREATE TABLE IF NOT EXISTS ".$wpdb->prefix."dc_mv_views (
|
72 |
+
id int(10) unsigned NOT NULL AUTO_INCREMENT,
|
73 |
+
calid int(10) unsigned DEFAULT NULL,
|
74 |
+
viewDay text,
|
75 |
+
viewWeek text,
|
76 |
+
viewMonth text,
|
77 |
+
viewNMonth text,
|
78 |
+
viewdefault text,
|
79 |
+
start_weekday text,
|
80 |
+
cssStyle text,
|
81 |
+
palette text,
|
82 |
+
edition text,
|
83 |
+
btoday text,
|
84 |
+
bnavigation text,
|
85 |
+
brefresh text,
|
86 |
+
numberOfMonths text,
|
87 |
+
showtooltip text,
|
88 |
+
tooltipon text,
|
89 |
+
shownavigate text,
|
90 |
+
url text,
|
91 |
+
target text,
|
92 |
+
otherparams text,
|
93 |
+
PRIMARY KEY (id)
|
94 |
+
);
|
95 |
+
";
|
96 |
+
$wpdb->query($sql);
|
97 |
+
|
98 |
+
// insert initial data
|
99 |
+
$count = $wpdb->get_var( "SELECT COUNT(id) FROM ".$wpdb->prefix."dc_mv_calendars" );
|
100 |
+
if (!$count)
|
101 |
+
$wpdb->query("INSERT INTO ".$wpdb->prefix."dc_mv_calendars (id,title,published) VALUES (1,'Calendar 1',1);");
|
102 |
+
$count = $wpdb->get_var( "SELECT COUNT(id) FROM ".$wpdb->prefix."dc_mv_configuration" );
|
103 |
+
if (!$count)
|
104 |
+
$wpdb->query("INSERT INTO ".$wpdb->prefix."dc_mv_configuration (id,palettes,administration) VALUES (1,'a:2:{i:0;a:3:{s:4:\"name\";s:7:\"Default\";s:6:\"colors\";a:70:{i:0;s:3:\"FFF\";i:1;s:3:\"FCC\";i:2;s:3:\"FC9\";i:3;s:3:\"FF9\";i:4;s:3:\"FFC\";i:5;s:3:\"9F9\";i:6;s:3:\"9FF\";i:7;s:3:\"CFF\";i:8;s:3:\"CCF\";i:9;s:3:\"FCF\";i:10;s:3:\"CCC\";i:11;s:3:\"F66\";i:12;s:3:\"F96\";i:13;s:3:\"FF6\";i:14;s:3:\"FF3\";i:15;s:3:\"6F9\";i:16;s:3:\"3FF\";i:17;s:3:\"6FF\";i:18;s:3:\"99F\";i:19;s:3:\"F9F\";i:20;s:3:\"BBB\";i:21;s:3:\"F00\";i:22;s:3:\"F90\";i:23;s:3:\"FC6\";i:24;s:3:\"FF0\";i:25;s:3:\"3F3\";i:26;s:3:\"6CC\";i:27;s:3:\"3CF\";i:28;s:3:\"66C\";i:29;s:3:\"C6C\";i:30;s:3:\"999\";i:31;s:3:\"C00\";i:32;s:3:\"F60\";i:33;s:3:\"FC3\";i:34;s:3:\"FC0\";i:35;s:3:\"3C0\";i:36;s:3:\"0CC\";i:37;s:3:\"36F\";i:38;s:3:\"63F\";i:39;s:3:\"C3C\";i:40;s:3:\"666\";i:41;s:3:\"900\";i:42;s:3:\"C60\";i:43;s:3:\"C93\";i:44;s:3:\"990\";i:45;s:3:\"090\";i:46;s:3:\"399\";i:47;s:3:\"33F\";i:48;s:3:\"60C\";i:49;s:3:\"939\";i:50;s:3:\"333\";i:51;s:3:\"600\";i:52;s:3:\"930\";i:53;s:3:\"963\";i:54;s:3:\"660\";i:55;s:3:\"060\";i:56;s:3:\"366\";i:57;s:3:\"009\";i:58;s:3:\"339\";i:59;s:3:\"636\";i:60;s:3:\"000\";i:61;s:3:\"300\";i:62;s:3:\"630\";i:63;s:3:\"633\";i:64;s:3:\"330\";i:65;s:3:\"030\";i:66;s:3:\"033\";i:67;s:3:\"006\";i:68;s:3:\"309\";i:69;s:3:\"303\";}s:7:\"default\";s:3:\"F00\";}i:1;a:3:{s:4:\"name\";s:9:\"Semaphore\";s:6:\"colors\";a:3:{i:0;s:3:\"F00\";i:1;s:3:\"FF3\";i:2;s:3:\"3C0\";}s:7:\"default\";s:3:\"3C0\";}}','a:15:{s:5:\"views\";a:4:{i:0;s:7:\"viewDay\";i:1;s:8:\"viewWeek\";i:2;s:9:\"viewMonth\";i:3;s:10:\"viewNMonth\";}s:11:\"viewdefault\";s:5:\"month\";s:8:\"language\";s:5:\"en-GB\";s:13:\"start_weekday\";s:1:\"0\";s:8:\"cssStyle\";s:9:\"cupertino\";s:12:\"paletteColor\";s:1:\"0\";s:6:\"btoday\";s:1:\"1\";s:11:\"bnavigation\";s:1:\"1\";s:8:\"brefresh\";s:1:\"1\";s:14:\"numberOfMonths\";s:2:\"12\";s:7:\"sample0\";N;s:7:\"sample1\";s:5:\"click\";s:7:\"sample2\";N;s:7:\"sample3\";s:0:\"\";s:7:\"sample4\";s:10:\"new_window\";}');");
|
105 |
+
}
|
106 |
+
|
107 |
+
|
108 |
+
// autodetect language
|
109 |
+
function _autodetect_language()
|
110 |
+
{
|
111 |
+
$basename = '/DC_MultiViewCal/language/multiview_lang_';
|
112 |
+
|
113 |
+
$binfo = str_replace('-','_',get_bloginfo('language'));
|
114 |
+
|
115 |
+
$options = array ($binfo,
|
116 |
+
strtolower($binfo),
|
117 |
+
substr(strtolower($binfo),0,2)."_".substr(strtoupper($binfo),strlen(strtoupper($binfo))-2,2),
|
118 |
+
substr(strtolower($binfo),0,2),
|
119 |
+
substr(strtolower($binfo),strlen(strtolower($binfo))-2,2)
|
120 |
+
);
|
121 |
+
foreach ($options as $option)
|
122 |
+
{
|
123 |
+
if (file_exists(dirname( __FILE__ ).$basename.$option.'.js'))
|
124 |
+
return $option;
|
125 |
+
$option = str_replace ("-","_", $option);
|
126 |
+
if (file_exists(dirname( __FILE__ ).$basename.$option.'.js'))
|
127 |
+
return $option;
|
128 |
+
}
|
129 |
+
return '';
|
130 |
+
}
|
131 |
+
|
132 |
+
|
133 |
+
/* Filter for placing the maps into the contents */
|
134 |
+
public function filter_content($atts) {
|
135 |
+
global $wpdb;
|
136 |
+
extract( shortcode_atts( array(
|
137 |
+
'calendar' => '',
|
138 |
+
), $atts ) );
|
139 |
+
if ($calendar != '')
|
140 |
+
$this->calendar = 1;
|
141 |
+
ob_start();
|
142 |
+
$this->insert_public_item($atts);
|
143 |
+
$buffered_contents = ob_get_contents();
|
144 |
+
ob_end_clean();
|
145 |
+
return $buffered_contents;
|
146 |
+
}
|
147 |
+
|
148 |
+
private function show_preview($id) {
|
149 |
+
global $wpdb;
|
150 |
+
|
151 |
+
if (file_exists(dirname( __FILE__ ).'/DC_MultiViewCal/language/multiview_lang_'.$this->_autodetect_language().'.js'))
|
152 |
+
$langscript = plugins_url('/DC_MultiViewCal/language/multiview_lang_'.$this->_autodetect_language().'.js', __FILE__);
|
153 |
+
else
|
154 |
+
$langscript = plugins_url('/DC_MultiViewCal/language/multiview_lang_en_GB.js', __FILE__);
|
155 |
+
|
156 |
+
$convert_arr = array(
|
157 |
+
'viewday' => 'viewDay',
|
158 |
+
'viewweek' => 'viewWeek',
|
159 |
+
'viewmonth' => 'viewMonth',
|
160 |
+
'viewnmonth' => 'viewNMonth',
|
161 |
+
'numberofmonths' => 'numberOfMonths',
|
162 |
+
'cssstyle' => 'cssStyle',
|
163 |
+
'militarytime' => 'militaryTime',
|
164 |
+
'useradd' => 'userAdd',
|
165 |
+
'useredit' => 'userEdit',
|
166 |
+
'userdel' => 'userDel',
|
167 |
+
'usereditowner' => 'userEditOwner',
|
168 |
+
'userdelowner' => 'userDelOwner',
|
169 |
+
'userowner' => 'userOwner',
|
170 |
+
'palettedefault' => 'paletteDefault'
|
171 |
+
);
|
172 |
+
|
173 |
+
$myrows = $wpdb->get_results( "SELECT * FROM ".$wpdb->prefix."dc_mv_views WHERE id=".intval($id) );
|
174 |
+
$base_params = array ();
|
175 |
+
$base_params['id'] = $myrows[0]->calid;
|
176 |
+
if ($myrows[0]->viewDay == 'true') $base_params['viewDay'] = $myrows[0]->viewDay;
|
177 |
+
if ($myrows[0]->viewWeek == 'true') $base_params['viewWeek'] = $myrows[0]->viewWeek;
|
178 |
+
if ($myrows[0]->viewMonth == 'true') $base_params['viewMonth'] = $myrows[0]->viewMonth;
|
179 |
+
if ($myrows[0]->viewNMonth == 'true') $base_params['viewNMonth'] = $myrows[0]->viewNMonth;
|
180 |
+
$base_params['viewdefault'] = $myrows[0]->viewdefault;
|
181 |
+
$base_params['start_weekday'] = $myrows[0]->start_weekday;
|
182 |
+
$base_params['cssStyle'] = $myrows[0]->cssStyle;
|
183 |
+
$base_params['palette'] = $myrows[0]->palette;
|
184 |
+
if ($myrows[0]->edition == 'true') $base_params['edition'] = $myrows[0]->edition;
|
185 |
+
if ($myrows[0]->btoday == 'true') $base_params['btoday'] = $myrows[0]->btoday;
|
186 |
+
if ($myrows[0]->bnavigation == 'true') $base_params['bnavigation'] = $myrows[0]->bnavigation;
|
187 |
+
if ($myrows[0]->brefresh == 'true') $base_params['brefresh'] = $myrows[0]->brefresh;
|
188 |
+
$base_params['numberOfMonths'] = $myrows[0]->numberOfMonths;
|
189 |
+
if ($myrows[0]->showtooltip == 'true') $base_params['showtooltip'] = $myrows[0]->showtooltip;
|
190 |
+
$base_params['tooltipon'] = $myrows[0]->tooltipon;
|
191 |
+
if ($myrows[0]->showtooltip == 'true')
|
192 |
+
if ($myrows[0]->tooltipon!=1)
|
193 |
+
$base_params['showtooltipdwm_mouseover'] = 'true';
|
194 |
+
else
|
195 |
+
$base_params['showtooltipdwm'] = 'true';
|
196 |
+
if ($myrows[0]->shownavigate == 'true') $base_params['shownavigate'] = $myrows[0]->shownavigate;
|
197 |
+
$base_params['url'] = $myrows[0]->url;
|
198 |
+
$base_params['target'] = $myrows[0]->target;
|
199 |
+
$base_params['otherparams'] = $myrows[0]->otherparams;
|
200 |
+
|
201 |
+
|
202 |
+
$params = "";
|
203 |
+
foreach ($base_params as $item => $value)
|
204 |
+
{
|
205 |
+
if (isset($convert_arr[$item]))
|
206 |
+
$item = $convert_arr[$item];
|
207 |
+
$item = str_replace(array('"', "'"),array('\\"', "\\'"),$item);
|
208 |
+
$value = str_replace("\n",'\\\\n',$value);
|
209 |
+
if (is_numeric($value) || $value == 'true' || $value == 'false')
|
210 |
+
$params .= ',"'.$item.'":'.$value;
|
211 |
+
else
|
212 |
+
$params .= ',"'.$item.'":"'.str_replace(array('"', "'"),array('\\"', "\\'"),$value).'"';
|
213 |
+
}
|
214 |
+
$params = '{'.substr($params,1).'}';
|
215 |
+
$params = str_replace(array('"', "'"),array('\\"', "\\'"),$params);
|
216 |
+
$this->print_counter = 0;
|
217 |
+
$plugin_url = plugins_url('', __FILE__);
|
218 |
+
|
219 |
+
$prefix_ui = '';
|
220 |
+
if (@file_exists('./wp-includes/js/jquery/ui/jquery.ui.core.min.js'))
|
221 |
+
$prefix_ui = 'jquery.ui.';
|
222 |
+
?>
|
223 |
+
<!DOCTYPE html>
|
224 |
+
<html>
|
225 |
+
<head><title>CP Multi View Event Calendar - Preview</title></head>
|
226 |
+
<body>
|
227 |
+
<script type='text/javascript' src='<?php echo $plugin_url.'/../../../'; ?>wp-includes/js/jquery/jquery.js'></script>
|
228 |
+
<script type='text/javascript' src='<?php echo $plugin_url.'/../../../'; ?>wp-includes/js/jquery/ui/<?php echo $prefix_ui; ?>core.min.js'></script>
|
229 |
+
<script type='text/javascript' src='<?php echo $plugin_url.'/../../../'; ?>wp-includes/js/jquery/ui/<?php echo $prefix_ui; ?>widget.min.js'></script>
|
230 |
+
<script type='text/javascript' src='<?php echo $plugin_url.'/../../../'; ?>wp-includes/js/jquery/ui/<?php echo $prefix_ui; ?>mouse.min.js'></script>
|
231 |
+
<script type='text/javascript' src='<?php echo $plugin_url.'/../../../'; ?>wp-includes/js/jquery/ui/<?php echo $prefix_ui; ?>resizable.min.js'></script>
|
232 |
+
<script type='text/javascript' src='<?php echo $plugin_url.'/../../../'; ?>wp-includes/js/jquery/ui/<?php echo $prefix_ui; ?>draggable.min.js'></script>
|
233 |
+
<script type='text/javascript' src='<?php echo $plugin_url.'/../../../'; ?>wp-includes/js/jquery/ui/<?php echo $prefix_ui; ?>button.min.js'></script>
|
234 |
+
<script type='text/javascript' src='<?php echo $plugin_url.'/../../../'; ?>wp-includes/js/jquery/ui/<?php echo $prefix_ui; ?>position.min.js?'></script>
|
235 |
+
<script type='text/javascript' src='<?php echo $plugin_url.'/../../../'; ?>wp-includes/js/jquery/ui/<?php echo $prefix_ui; ?>dialog.min.js'></script>
|
236 |
+
<script type='text/javascript' src='<?php echo $plugin_url.'/../../../'; ?>wp-includes/js/jquery/ui/<?php echo $prefix_ui; ?>datepicker.min.js'></script>
|
237 |
+
<script type='text/javascript' src='<?php echo plugins_url('/DC_MultiViewCal/src/Plugins/Common.js', __FILE__); ?>'></script>
|
238 |
+
<script type='text/javascript' src='<?php echo plugins_url('/DC_MultiViewCal/src/Plugins/underscore.js', __FILE__); ?>'></script>
|
239 |
+
<script type='text/javascript' src='<?php echo plugins_url('/DC_MultiViewCal/src/Plugins/rrule.js', __FILE__); ?>'></script>
|
240 |
+
<script type='text/javascript' src='<?php echo $langscript; ?>'></script>
|
241 |
+
<script type='text/javascript' src='<?php echo plugins_url('/DC_MultiViewCal/src/Plugins/jquery.calendar.js', __FILE__); ?>'></script>
|
242 |
+
<script type='text/javascript' src='<?php echo plugins_url('/DC_MultiViewCal/src/Plugins/jquery.alert.js', __FILE__); ?>'></script>
|
243 |
+
<script type='text/javascript' src='<?php echo plugins_url('/DC_MultiViewCal/src/Plugins/multiview.js', __FILE__); ?>'></script>
|
244 |
+
<?php @include dirname( __FILE__ ) . '/php/list.inc.php'; ?>
|
245 |
+
<script type="text/javascript">//<!--
|
246 |
+
<?php echo $arrayJS_list; ?>
|
247 |
+
|
248 |
+
//-->
|
249 |
+
</script>
|
250 |
+
<?php @include dirname( __FILE__ ) . '/cp-public-int.inc.php'; ?>
|
251 |
+
<script type='text/javascript'>
|
252 |
+
/* <![CDATA[ */
|
253 |
+
var cpmvc_configmultiview0 = {"obj":"{\"params\":<?php echo $params; ?>,\n \"ajax_url\":\"<?php echo str_replace(array('"', "'"),array('\\"', "\\'"),$this->get_site_url()); ?>/?cpmvc_do_action=mvparse\",\n \"calendar\":\"<?php echo str_replace(array('"', "'"),array('\\"', "\\'"),$base_params["id"]); ?>\"\n \t }"};
|
254 |
+
/* ]]> */
|
255 |
+
</script>
|
256 |
+
<script type='text/javascript' src='<?php echo plugins_url('/DC_MultiViewCal/src/Plugins/multiview.public.js', __FILE__); ?>'></script>
|
257 |
+
</body></html>
|
258 |
+
<?php
|
259 |
+
exit;
|
260 |
+
}
|
261 |
+
|
262 |
+
|
263 |
+
public function insert_public_item($atts) {
|
264 |
+
global $wpdb;
|
265 |
+
|
266 |
+
$convert_arr = array(
|
267 |
+
'viewday' => 'viewDay',
|
268 |
+
'viewweek' => 'viewWeek',
|
269 |
+
'viewmonth' => 'viewMonth',
|
270 |
+
'viewnmonth' => 'viewNMonth',
|
271 |
+
'numberofmonths' => 'numberOfMonths',
|
272 |
+
'cssstyle' => 'cssStyle',
|
273 |
+
'militarytime' => 'militaryTime',
|
274 |
+
'useradd' => 'userAdd',
|
275 |
+
'useredit' => 'userEdit',
|
276 |
+
'userdel' => 'userDel',
|
277 |
+
'usereditowner' => 'userEditOwner',
|
278 |
+
'userdelowner' => 'userDelOwner',
|
279 |
+
'userowner' => 'userOwner',
|
280 |
+
'palettedefault' => 'paletteDefault'
|
281 |
+
);
|
282 |
+
|
283 |
+
if ($atts["view"] != '') {
|
284 |
+
$myrows = $wpdb->get_results( "SELECT * FROM ".$wpdb->prefix."dc_mv_views WHERE id=".intval($atts["view"]) );
|
285 |
+
if (!count($myrows))
|
286 |
+
{
|
287 |
+
echo '<strong>Warning:</strong> The VIEW ID #<strong>'.$atts["view"].'</strong> isn\'t avaiable in the database. Please be sure to indicate a valid VIEW ID for the CP Multi View Event Calendar in the shortcode.';
|
288 |
+
return;
|
289 |
+
}
|
290 |
+
$base_params = array ();
|
291 |
+
$base_params['id'] = $myrows[0]->calid;
|
292 |
+
if ($myrows[0]->viewDay == 'true') $base_params['viewDay'] = $myrows[0]->viewDay;
|
293 |
+
if ($myrows[0]->viewWeek == 'true') $base_params['viewWeek'] = $myrows[0]->viewWeek;
|
294 |
+
if ($myrows[0]->viewMonth == 'true') $base_params['viewMonth'] = $myrows[0]->viewMonth;
|
295 |
+
if ($myrows[0]->viewNMonth == 'true') $base_params['viewNMonth'] = $myrows[0]->viewNMonth;
|
296 |
+
$base_params['viewdefault'] = $myrows[0]->viewdefault;
|
297 |
+
$base_params['start_weekday'] = $myrows[0]->start_weekday;
|
298 |
+
$base_params['cssStyle'] = $myrows[0]->cssStyle;
|
299 |
+
$base_params['palette'] = $myrows[0]->palette;
|
300 |
+
if ($myrows[0]->edition == 'true') $base_params['edition'] = $myrows[0]->edition;
|
301 |
+
if ($myrows[0]->btoday == 'true') $base_params['btoday'] = $myrows[0]->btoday;
|
302 |
+
if ($myrows[0]->bnavigation == 'true') $base_params['bnavigation'] = $myrows[0]->bnavigation;
|
303 |
+
if ($myrows[0]->brefresh == 'true') $base_params['brefresh'] = $myrows[0]->brefresh;
|
304 |
+
$base_params['numberOfMonths'] = $myrows[0]->numberOfMonths;
|
305 |
+
if ($myrows[0]->showtooltip == 'true') $base_params['showtooltip'] = $myrows[0]->showtooltip;
|
306 |
+
$base_params['tooltipon'] = $myrows[0]->tooltipon;
|
307 |
+
if ($myrows[0]->showtooltip == 'true')
|
308 |
+
if ($myrows[0]->tooltipon!=1)
|
309 |
+
$base_params['showtooltipdwm_mouseover'] = 'true';
|
310 |
+
else
|
311 |
+
$base_params['showtooltipdwm'] = 'true';
|
312 |
+
if ($myrows[0]->shownavigate == 'true') $base_params['shownavigate'] = $myrows[0]->shownavigate;
|
313 |
+
$base_params['url'] = $myrows[0]->url;
|
314 |
+
$base_params['target'] = $myrows[0]->target;
|
315 |
+
$base_params['otherparams'] = $myrows[0]->otherparams;
|
316 |
+
}
|
317 |
+
else
|
318 |
+
$base_params = $atts;
|
319 |
+
|
320 |
+
$params = "";
|
321 |
+
foreach ($base_params as $item => $value)
|
322 |
+
{
|
323 |
+
if (isset($convert_arr[$item]))
|
324 |
+
$item = $convert_arr[$item];
|
325 |
+
$item = str_replace(array('"', "'"),array('\\"', "\\'"),$item);
|
326 |
+
if (is_numeric($value) || $value == 'true' || $value == 'false')
|
327 |
+
$params .= ',"'.$item.'":'.$value;
|
328 |
+
else
|
329 |
+
$params .= ',"'.$item.'":"'.str_replace(array('"', "'"),array('\\"', "\\'"),$value).'"';
|
330 |
+
}
|
331 |
+
$params = '{'.substr($params,1).'}';
|
332 |
+
|
333 |
+
if (file_exists(dirname( __FILE__ ).'/DC_MultiViewCal/language/multiview_lang_'.$this->_autodetect_language().'.js'))
|
334 |
+
$langscript = plugins_url('/DC_MultiViewCal/language/multiview_lang_'.$this->_autodetect_language().'.js', __FILE__);
|
335 |
+
else
|
336 |
+
$langscript = plugins_url('/DC_MultiViewCal/language/multiview_lang_en_GB.js', __FILE__);
|
337 |
+
|
338 |
+
if (CP_MVC_DEFER_SCRIPTS_LOADING)
|
339 |
+
{
|
340 |
+
wp_register_script('cpmvc-common', plugins_url('/DC_MultiViewCal/src/Plugins/Common.js', __FILE__));
|
341 |
+
wp_register_script('cpmvc-underscore', plugins_url('/DC_MultiViewCal/src/Plugins/underscore.js', __FILE__));
|
342 |
+
wp_register_script('cpmvc-rrule', plugins_url('/DC_MultiViewCal/src/Plugins/rrule.js', __FILE__));
|
343 |
+
|
344 |
+
wp_register_script('cpmvc-lang', $langscript);
|
345 |
+
|
346 |
+
wp_register_script('cpmvc-jqcalendar', plugins_url('/DC_MultiViewCal/src/Plugins/jquery.calendar.js', __FILE__));
|
347 |
+
wp_register_script('cpmvc-jqalert', plugins_url('/DC_MultiViewCal/src/Plugins/jquery.alert.js', __FILE__));
|
348 |
+
wp_register_script('cpmvc-multiview', plugins_url('/DC_MultiViewCal/src/Plugins/multiview.js', __FILE__));
|
349 |
+
|
350 |
+
wp_enqueue_script( 'cpmvc-publicjs', plugins_url('/DC_MultiViewCal/src/Plugins/multiview.public.js', __FILE__),
|
351 |
+
array("jquery","jquery-ui-core", "jquery-ui-dialog", "jquery-ui-datepicker",'cpmvc-common','cpmvc-underscore','cpmvc-rrule','cpmvc-lang','cpmvc-jqcalendar','cpmvc-jqalert','cpmvc-multiview'),
|
352 |
+
false, true);
|
353 |
+
|
354 |
+
wp_localize_script('cpmvc-publicjs', 'cpmvc_configmultiview'.($this->print_counter), array('obj' =>
|
355 |
+
'{"params":'.$params.',
|
356 |
+
"ajax_url":"'.str_replace(array('"', "'"),array('\\"', "\\'"),$this->get_site_url()).'/?cpmvc_do_action=mvparse",
|
357 |
+
"calendar":"'.str_replace(array('"', "'"),array('\\"', "\\'"),$base_params["id"]).'"
|
358 |
+
}'
|
359 |
+
));
|
360 |
+
} else {
|
361 |
+
$plugin_url = plugins_url('', __FILE__);
|
362 |
+
$prefix_ui = '';
|
363 |
+
if (@file_exists(dirname( __FILE__ ).'/../../../wp-includes/js/jquery/ui/jquery.ui.core.min.js'))
|
364 |
+
$prefix_ui = 'jquery.ui.';
|
365 |
+
?>
|
366 |
+
<script type='text/javascript' src='<?php echo $plugin_url.'/../../../'; ?>wp-includes/js/jquery/jquery.js'></script><script type='text/javascript' src='<?php echo $plugin_url.'/../../../'; ?>wp-includes/js/jquery/ui/<?php echo $prefix_ui; ?>core.min.js'></script><script type='text/javascript' src='<?php echo $plugin_url.'/../../../'; ?>wp-includes/js/jquery/ui/<?php echo $prefix_ui; ?>widget.min.js'></script><script type='text/javascript' src='<?php echo $plugin_url.'/../../../'; ?>wp-includes/js/jquery/ui/<?php echo $prefix_ui; ?>mouse.min.js'></script><script type='text/javascript' src='<?php echo $plugin_url.'/../../../'; ?>wp-includes/js/jquery/ui/<?php echo $prefix_ui; ?>resizable.min.js'></script><script type='text/javascript' src='<?php echo $plugin_url.'/../../../'; ?>wp-includes/js/jquery/ui/<?php echo $prefix_ui; ?>draggable.min.js'></script><script type='text/javascript' src='<?php echo $plugin_url.'/../../../'; ?>wp-includes/js/jquery/ui/<?php echo $prefix_ui; ?>button.min.js'></script><script type='text/javascript' src='<?php echo $plugin_url.'/../../../'; ?>wp-includes/js/jquery/ui/<?php echo $prefix_ui; ?>position.min.js?'></script><script type='text/javascript' src='<?php echo $plugin_url.'/../../../'; ?>wp-includes/js/jquery/ui/<?php echo $prefix_ui; ?>dialog.min.js'></script><script type='text/javascript' src='<?php echo $plugin_url.'/../../../'; ?>wp-includes/js/jquery/ui/<?php echo $prefix_ui; ?>datepicker.min.js'></script><script type='text/javascript' src='<?php echo plugins_url('/DC_MultiViewCal/src/Plugins/Common.js', __FILE__); ?>'></script><script type='text/javascript' src='<?php echo plugins_url('/DC_MultiViewCal/src/Plugins/underscore.js', __FILE__); ?>'></script><script type='text/javascript' src='<?php echo plugins_url('/DC_MultiViewCal/src/Plugins/rrule.js', __FILE__); ?>'></script><script type='text/javascript' src='<?php echo $langscript; ?>'></script><script type='text/javascript' src='<?php echo plugins_url('/DC_MultiViewCal/src/Plugins/jquery.calendar.js', __FILE__); ?>'></script><script type='text/javascript' src='<?php echo plugins_url('/DC_MultiViewCal/src/Plugins/jquery.alert.js', __FILE__); ?>'></script><script type='text/javascript' src='<?php echo plugins_url('/DC_MultiViewCal/src/Plugins/multiview.js', __FILE__); ?>'></script>
|
367 |
+
<?php
|
368 |
+
}
|
369 |
+
|
370 |
+
@include dirname( __FILE__ ) . '/cp-public-int.inc.php';
|
371 |
+
|
372 |
+
if (!CP_MVC_DEFER_SCRIPTS_LOADING)
|
373 |
+
{
|
374 |
+
?>
|
375 |
+
<script type='text/javascript'>
|
376 |
+
/* <![CDATA[ */
|
377 |
+
var cpmvc_configmultiview<?php echo ($this->print_counter); ?> = {"obj":"{\"params\":<?php echo str_replace('"','\"',str_replace('\\','\\\\',$params)); ?>,\n \"ajax_url\":\"<?php echo str_replace(array('"', "'"),array('\\"', "\\'"),$this->get_site_url()); ?>/?cpmvc_do_action=mvparse\",\n \"calendar\":\"<?php echo str_replace(array('"', "'"),array('\\"', "\\'"),$base_params["id"]); ?>\"\n \t }"};
|
378 |
+
/* ]]> */
|
379 |
+
</script>
|
380 |
+
<script type='text/javascript' src='<?php echo plugins_url('/DC_MultiViewCal/src/Plugins/multiview.public.js', __FILE__); ?>'></script>
|
381 |
+
<?php
|
382 |
+
}
|
383 |
+
|
384 |
+
$this->print_counter++;
|
385 |
+
}
|
386 |
+
|
387 |
+
|
388 |
+
/* Code for the admin area */
|
389 |
+
|
390 |
+
public function plugin_page_links($links) {
|
391 |
+
$customAdjustments_link = '<a href="http://wordpress.dwbooster.com/support?custom_mod=1">'.__('Request custom changes').'</a>';
|
392 |
+
array_unshift($links, $customAdjustments_link);
|
393 |
+
$settings_link = '<a href="admin.php?page='.$this->menu_parameter.'_manage">'.__('Settings').'</a>';
|
394 |
+
array_unshift($links, $settings_link);
|
395 |
+
$help_link = '<a href="'.$this->plugin_URL.'">'.__('Help').'</a>';
|
396 |
+
array_unshift($links, $help_link);
|
397 |
+
return $links;
|
398 |
+
}
|
399 |
+
|
400 |
+
public function admin_menu() {
|
401 |
+
add_options_page($this->plugin_name.' Options', $this->plugin_name, 'manage_options', $this->menu_parameter.'settings', array($this, 'settings_page') );
|
402 |
+
add_menu_page( $this->plugin_name.' Options', $this->plugin_name, null, $this->menu_parameter, array($this, 'settings_page') );
|
403 |
+
add_submenu_page( $this->menu_parameter, 'Manage Calendars', 'Manage Calendars', 'edit_pages', $this->menu_parameter."_manage", array($this, 'settings_page') );
|
404 |
+
add_submenu_page( $this->menu_parameter, 'Help: Sample Views', 'Help: Sample Views', 'edit_pages', $this->menu_parameter."_samples", array($this, 'settings_page') );
|
405 |
+
add_submenu_page( $this->menu_parameter, 'Help: CSS Styles', 'Help: CSS Styles', 'edit_pages', $this->menu_parameter."_css", array($this, 'settings_page') );
|
406 |
+
add_submenu_page( $this->menu_parameter, 'Help: Online Demo', 'Help: Online Demo', 'edit_pages', $this->menu_parameter."_demo", array($this, 'settings_page') );
|
407 |
+
add_submenu_page( $this->menu_parameter, 'Export/Import iCal', 'Export/Import iCal', 'edit_pages', $this->menu_parameter."_ical", array($this, 'settings_page') );
|
408 |
+
add_submenu_page( $this->menu_parameter, 'Upgrade', 'Upgrade', 'edit_pages', $this->menu_parameter."_upgrade", array($this, 'settings_page') );
|
409 |
+
|
410 |
+
add_meta_box($this->prefix.'box', $this->plugin_name, array($this, 'insertMetaBox'), 'post', 'normal');
|
411 |
+
add_meta_box($this->prefix.'box', $this->plugin_name, array($this, 'insertMetaBox'), 'page', 'normal');
|
412 |
+
}
|
413 |
+
|
414 |
+
public function insertMetaBox() {
|
415 |
+
global $wpdb;
|
416 |
+
wp_enqueue_script( "jquery" );
|
417 |
+
wp_enqueue_script( "jquery-ui-core" );
|
418 |
+
wp_enqueue_script( "jquery-ui-dialog" );
|
419 |
+
wp_enqueue_style ( "wp-jquery-ui-dialog" );
|
420 |
+
$this->ajax_nonce = wp_create_nonce( $this->prefix );
|
421 |
+
@include_once dirname( __FILE__ ) . '/cp-metabox.inc.php';
|
422 |
+
}
|
423 |
+
|
424 |
+
private function printViewsList() {
|
425 |
+
global $wpdb;
|
426 |
+
// print the list of views
|
427 |
+
//....
|
428 |
+
$seed = date("His").mt_rand(10,100);
|
429 |
+
$buffer = "";
|
430 |
+
$buffer_scripts = "";
|
431 |
+
$last_id = 0;
|
432 |
+
$myrows = $wpdb->get_results( "SELECT ".$wpdb->prefix."dc_mv_views.*,".$wpdb->prefix."dc_mv_calendars.title FROM ".$wpdb->prefix."dc_mv_views INNER JOIN ".$wpdb->prefix."dc_mv_calendars ON ".$wpdb->prefix."dc_mv_views.calid= ".$wpdb->prefix."dc_mv_calendars.id");
|
433 |
+
foreach ($myrows as $item)
|
434 |
+
{
|
435 |
+
$buffer .= '<tr>';
|
436 |
+
$buffer .= '<td>#'.$item->id.'</td>';
|
437 |
+
$buffer .= '<td>'.htmlentities($item->title).'</td>';
|
438 |
+
$buffer .= '<td nowrap style="color:#338833;font-weight:bold;">[CPMV_CALENDAR view="'.$item->id.'"]</td>';
|
439 |
+
$buffer .= '<td>';
|
440 |
+
$buffer .= '<a class="button" style="" href="javascript:'.$this->prefix.'Admin.sendToEditor('.$item->calid.','.$item->id.');">'.__('Publish').'</a> ';
|
441 |
+
$buffer .= '<a class="button" href="javascript:'.$this->prefix.'previewCalendarId('.$item->id.');">'.__('Preview').'</a> ';
|
442 |
+
$buffer .= '<a class="button" href="javascript:'.$this->prefix.$seed.'editCalendar'.$item->id.'();">'.__('Edit').'</a> ';
|
443 |
+
$buffer .= '<a class="button" href="javascript:'.$this->prefix.'deleteCalendar('.$item->id.');">'.__('Delete').'</a>';
|
444 |
+
$buffer .= '</td>';
|
445 |
+
$buffer .= '</tr>';
|
446 |
+
// generate edit function
|
447 |
+
$buffer_scripts .= 'function '.$this->prefix.$seed.'editCalendar'.$item->id.'(){';
|
448 |
+
$buffer_scripts .= $this->prefix.'_sel_sel("id","'.$item->calid.'");';
|
449 |
+
$buffer_scripts .= $this->prefix.'_sel_chk("viewDay","'.$item->viewDay.'");';
|
450 |
+
$buffer_scripts .= $this->prefix.'_sel_chk("viewWeek","'.$item->viewWeek.'");';
|
451 |
+
$buffer_scripts .= $this->prefix.'_sel_chk("viewMonth","'.$item->viewMonth.'");';
|
452 |
+
$buffer_scripts .= $this->prefix.'_sel_chk("viewNMonth","'.$item->viewNMonth.'");';
|
453 |
+
$buffer_scripts .= $this->prefix.'_sel_sel("viewdefault","'.$item->viewdefault.'");';
|
454 |
+
$buffer_scripts .= $this->prefix.'_sel_sel("start_weekday","'.$item->start_weekday.'");';
|
455 |
+
$buffer_scripts .= $this->prefix.'_sel_sel("cssStyle","'.$item->cssStyle.'");';
|
456 |
+
$buffer_scripts .= $this->prefix.'_sel_sel("palette","'.$item->palette.'");';
|
457 |
+
$buffer_scripts .= $this->prefix.'_sel_chk("edition","'.$item->edition.'");';
|
458 |
+
$buffer_scripts .= $this->prefix.'_sel_chk("btoday","'.$item->btoday.'");';
|
459 |
+
$buffer_scripts .= $this->prefix.'_sel_chk("bnavigation","'.$item->bnavigation.'");';
|
460 |
+
$buffer_scripts .= $this->prefix.'_sel_chk("brefresh","'.$item->brefresh.'");';
|
461 |
+
$buffer_scripts .= $this->prefix.'_sel_sel("numberOfMonths","'.$item->numberOfMonths.'");';
|
462 |
+
$buffer_scripts .= $this->prefix.'_sel_chk("showtooltip","'.$item->showtooltip.'");';
|
463 |
+
$buffer_scripts .= $this->prefix.'_sel_sel("tooltipon","'.$item->tooltipon.'");';
|
464 |
+
$buffer_scripts .= $this->prefix.'_sel_chk("shownavigate","'.$item->shownavigate.'");';
|
465 |
+
$buffer_scripts .= $this->prefix.'_sel_fld("url","'.$item->url.'");';
|
466 |
+
$buffer_scripts .= $this->prefix.'_sel_sel("target","'.$item->target.'");';
|
467 |
+
$buffer_scripts .= $this->prefix.'_sel_fld("otherparams","'.str_replace("\r","",str_replace("\n","",str_replace('"','\"',$item->otherparams))).'");';
|
468 |
+
$buffer_scripts .= $this->prefix.'createNewCalendar('.$item->id.');';
|
469 |
+
$buffer_scripts .= '}';
|
470 |
+
$last_id = $item->id;
|
471 |
+
}
|
472 |
+
$buffer_scripts = '<div id="'.$this->prefix.'scriptsarea" style="display:none">'.$buffer_scripts.(@$_POST["viewid"] == '0'?'document.getElementById("r'.$this->prefix.'isediting").value="'.$last_id.'";':'').'</div>';
|
473 |
+
if ($buffer != '')
|
474 |
+
{
|
475 |
+
?>
|
476 |
+
<table cellpadding="5">
|
477 |
+
<tr>
|
478 |
+
<th align="left" nowrap style="border-bottom:1px dotted black;">View ID</th>
|
479 |
+
<th align="left" style="border-bottom:1px dotted black;">Calendar</th>
|
480 |
+
<th align="left" style="border-bottom:1px dotted black;">Shortcode</th>
|
481 |
+
<th align="left" style="border-bottom:1px dotted black;">Options</th>
|
482 |
+
</tr>
|
483 |
+
<?php echo $buffer; ?>
|
484 |
+
</table>
|
485 |
+
<?php echo $buffer_scripts; ?>
|
486 |
+
<?php
|
487 |
+
} else {
|
488 |
+
echo '<strong>';
|
489 |
+
_e('Start creating a new calendar view with the following button:');
|
490 |
+
echo '</strong>';
|
491 |
+
}
|
492 |
+
}
|
493 |
+
|
494 |
+
public function ajax_get_views() {
|
495 |
+
global $wpdb;
|
496 |
+
check_ajax_referer( $this->prefix, 'security' );
|
497 |
+
$this->printViewsList();
|
498 |
+
die();
|
499 |
+
}
|
500 |
+
|
501 |
+
private function ajax_get_posted_params() {
|
502 |
+
foreach ($_POST as $item => $value)
|
503 |
+
$_POST[$item] = stripcslashes($value);
|
504 |
+
$rawparams = explode("||||||",$_POST["params"]);
|
505 |
+
$params = array ( 'viewDay' => '',
|
506 |
+
'viewWeek' => '',
|
507 |
+
'viewMonth' => '',
|
508 |
+
'viewNMonth' => '',
|
509 |
+
'edition' => '',
|
510 |
+
'btoday' => '',
|
511 |
+
'bnavigation' => '',
|
512 |
+
'brefresh' => '',
|
513 |
+
'showtooltip' => '',
|
514 |
+
'shownavigate' => '',
|
515 |
+
'otherparams' => '',
|
516 |
+
'url' => ''
|
517 |
+
);
|
518 |
+
foreach ($rawparams as $item)
|
519 |
+
{
|
520 |
+
$item = trim($item);
|
521 |
+
if ($item != '')
|
522 |
+
{
|
523 |
+
$tmppos = strpos($item, "="); //explode("=",$item);
|
524 |
+
$tmp = array( substr($item,0,$tmppos), substr($item,$tmppos+1) );
|
525 |
+
$params[$tmp[0]] = substr($tmp[1],1,strlen($tmp[1])-2);
|
526 |
+
}
|
527 |
+
}
|
528 |
+
return $params;
|
529 |
+
}
|
530 |
+
|
531 |
+
public function ajax_add_calendar() { // this function is also used for updating
|
532 |
+
global $wpdb;
|
533 |
+
check_ajax_referer( $this->prefix, 'security' );
|
534 |
+
$_POST["viewid"] = intval($_POST["viewid"]);
|
535 |
+
// add calendar view
|
536 |
+
$params = $this->ajax_get_posted_params();
|
537 |
+
if ($_POST["viewid"] == '0')
|
538 |
+
$wpdb->insert($wpdb->prefix."dc_mv_views", $params);
|
539 |
+
else
|
540 |
+
{
|
541 |
+
$wpdb->update($wpdb->prefix."dc_mv_views", $params, array( 'id' => $_POST["viewid"] ));
|
542 |
+
}
|
543 |
+
|
544 |
+
$this->printViewsList();
|
545 |
+
die();
|
546 |
+
}
|
547 |
+
|
548 |
+
public function ajax_delete_calendar() {
|
549 |
+
global $wpdb;
|
550 |
+
check_ajax_referer( $this->prefix, 'security' );
|
551 |
+
$_POST["id"] = intval($_POST["id"]);
|
552 |
+
// delete calendar view
|
553 |
+
$wpdb->delete($wpdb->prefix."dc_mv_views", array( 'id' => $_POST["id"] ));
|
554 |
+
|
555 |
+
$this->printViewsList();
|
556 |
+
die();
|
557 |
+
}
|
558 |
+
|
559 |
+
public function settings_page() {
|
560 |
+
global $wpdb;
|
561 |
+
if ($this->get_param("cpmvc_id"))
|
562 |
+
{
|
563 |
+
$this->calendar = 1;
|
564 |
+
@include_once dirname( __FILE__ ) . '/cp-admin-int.inc.php';
|
565 |
+
}
|
566 |
+
else if ($this->get_param("page") == 'cp_multiview_samples')
|
567 |
+
{
|
568 |
+
@include_once dirname( __FILE__ ) . '/help/samples.html';
|
569 |
+
}
|
570 |
+
else if ($this->get_param("page") == 'cp_multiview_ical')
|
571 |
+
{
|
572 |
+
?>
|
573 |
+
<br />
|
574 |
+
<div id="metabox_basic_settings" class="postbox" >
|
575 |
+
<h3 class='hndle' style="padding:5px;"><span>Export to iCal files and Import from iCal files</span></h3>
|
576 |
+
<div class="inside">
|
577 |
+
<p>This option is available only in the <a target="_blank" href="http://wordpress.dwbooster.com/calendars/cp-multi-view-calendar#download">Platinum version of the CP Multi View Calendar</a>.</p>
|
578 |
+
<p>This feature allows to export the calendar data to an iCal file and import data into the calendar from a iCal file.</p>
|
579 |
+
<p>The iCal format used is compatible with Google Calendar, Android Calendars and other calendars supporting the iCal standard.</p>
|
580 |
+
<p>iCal files can be exported/imported separately for each calendar. When using the <a target="_blank" href="http://wordpress.dwbooster.com/calendars/cp-multi-view-calendar#download">Platinum version of the CP Multi View Calendar</a> this feature
|
581 |
+
is located into the "Admin Calendar Data" for each calendar.</p>
|
582 |
+
</div>
|
583 |
+
</div>
|
584 |
+
[<a href="http://wordpress.dwbooster.com/support?custom_mod=1" target="_blank">Request Custom Modifications</a>] | [<a href="http://wordpress.dwbooster.com/calendars/cp-appointment-calendar" target="_blank">Help</a>]
|
585 |
+
|
586 |
+
|
587 |
+
|
588 |
+
|
589 |
+
|
590 |
+
|
591 |
+
<?php
|
592 |
+
//@include_once dirname( __FILE__ ) . '/help/samples.html';
|
593 |
+
}
|
594 |
+
else if ($this->get_param("page") == 'cp_multiview_css')
|
595 |
+
{
|
596 |
+
@include_once dirname( __FILE__ ) . '/help/cssstyles.html';
|
597 |
+
}
|
598 |
+
else if ($this->get_param("page") == 'cp_multiview_upgrade')
|
599 |
+
{
|
600 |
+
echo("Redirecting to upgrade page...<script type='text/javascript'>document.location='http://wordpress.dwbooster.com/calendars/cp-multi-view-calendar#download';</script>");
|
601 |
+
exit;
|
602 |
+
}
|
603 |
+
else if ($this->get_param("page") == 'cp_multiview_demo')
|
604 |
+
{
|
605 |
+
echo("Redirecting to demo page...<script type='text/javascript'>document.location='http://wordpress.dwbooster.com/calendars/cp-multi-view-calendar#demo';</script>");
|
606 |
+
exit;
|
607 |
+
}
|
608 |
+
else
|
609 |
+
@include_once dirname( __FILE__ ) . '/cp-admin-int-list.inc.php';
|
610 |
+
}
|
611 |
+
|
612 |
+
function insert_adminScripts($hook) {
|
613 |
+
if ($this->get_param("page") == $this->menu_parameter."_manage")
|
614 |
+
{
|
615 |
+
wp_enqueue_script( "jquery" );
|
616 |
+
wp_enqueue_script( "jquery-ui-core" );
|
617 |
+
wp_enqueue_script( "jquery-ui-dialog" );
|
618 |
+
wp_enqueue_script( "jquery-ui-datepicker" );
|
619 |
+
}
|
620 |
+
}
|
621 |
+
|
622 |
+
/* hook for checking posted data for the admin area */
|
623 |
+
|
624 |
+
function data_management() {
|
625 |
+
global $wpdb;
|
626 |
+
$action = $this->get_param('cpmvc_do_action');
|
627 |
+
if (!$action) return; // go out if the call isn't for this one
|
628 |
+
|
629 |
+
if ($this->get_param('cpmvc_id')) $this->calendar = 1;
|
630 |
+
|
631 |
+
if ($action == "mvparse")
|
632 |
+
{
|
633 |
+
$feed = $this->get_param('f');
|
634 |
+
if ($feed == 'datafeed')
|
635 |
+
{
|
636 |
+
@include_once dirname( __FILE__ ) . '/php/functions.php';
|
637 |
+
@include_once dirname( __FILE__ ) . '/php/datafeed.php';
|
638 |
+
exit();
|
639 |
+
}
|
640 |
+
else if ($feed == 'edit')
|
641 |
+
{
|
642 |
+
@include_once dirname( __FILE__ ) . '/php/functions.php';
|
643 |
+
@include_once dirname( __FILE__ ) . '/php/edit.php';
|
644 |
+
exit();
|
645 |
+
}
|
646 |
+
}
|
647 |
+
else if ($action == "preview")
|
648 |
+
{
|
649 |
+
$this->show_preview($_GET["id"]);
|
650 |
+
exit();
|
651 |
+
}
|
652 |
+
|
653 |
+
// ...
|
654 |
+
echo 'Some unexpected error happened. If you see this error contact the support service at http://wordpress.dwbooster.com/support?src=cp_nv_cal_unexpected';
|
655 |
+
|
656 |
+
exit();
|
657 |
+
}
|
658 |
+
|
659 |
+
} // end class
|
660 |
+
|
661 |
+
?>
|
cp-metabox.inc.php
ADDED
@@ -0,0 +1,414 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php if ( !is_admin() ) {echo 'Direct access not allowed.';exit;} ?>
|
2 |
+
|
3 |
+
<input type="hidden" name="r<?php echo $this->prefix; ?>isediting" id="r<?php echo $this->prefix; ?>isediting" value="0" />
|
4 |
+
<table class="form-table" id="<?php echo $this->prefix; ?>createbox" style="display:none">
|
5 |
+
<tr valign="top">
|
6 |
+
<th scope="row"><label>MultiCalendar</label></th>
|
7 |
+
<td><select id="<?php echo $this->prefix; ?>_id" name="<?php echo $this->prefix; ?>[calid]" class="required">
|
8 |
+
<?php
|
9 |
+
$myrows = $wpdb->get_results( "SELECT * FROM ". $wpdb->prefix."dc_mv_calendars");
|
10 |
+
foreach ($myrows as $item)
|
11 |
+
echo '<option value="'.$item->id.'">'.htmlentities($item->title).'</option>';
|
12 |
+
?>
|
13 |
+
</select>
|
14 |
+
</td>
|
15 |
+
</tr>
|
16 |
+
<tr valign="top">
|
17 |
+
<th scope="row"><label>Calendar Views</label></th>
|
18 |
+
<td>
|
19 |
+
<input type="checkbox" id="<?php echo $this->prefix; ?>_viewDay" name="<?php echo $this->prefix; ?>[viewDay]" value="true" checked="checked"/><label>Day</label>
|
20 |
+
<input type="checkbox" id="<?php echo $this->prefix; ?>_viewWeek" name="<?php echo $this->prefix; ?>[viewWeek]" value="true" checked="checked"/><label>Week</label>
|
21 |
+
<input type="checkbox" id="<?php echo $this->prefix; ?>_viewMonth" name="<?php echo $this->prefix; ?>[viewMonth]" value="true" checked="checked"/><label>Month</label>
|
22 |
+
<input type="checkbox" id="<?php echo $this->prefix; ?>_viewNMonth" name="<?php echo $this->prefix; ?>[viewNMonth]" value="true" checked="checked"/><label>nMonth</label>
|
23 |
+
<div style="position:relative;display:inline;"><div style="z-index:1;position:absolute;top:0px;left:0px;width:100%;height:100%;background:#888;opacity: 0.4;filter: alpha(opacity=40); "></div> <input type="checkbox" id="<?php echo $this->prefix; ?>_viewList" name="<?php echo $this->prefix; ?>[viewList]" value="true" /><label>List *</label> </div>
|
24 |
+
<div style="position:relative;"><div style="z-index:1;position:absolute;top:0px;left:0px;width:100%;height:100%;background:#888;opacity: 0.4;filter: alpha(opacity=40); "></div>
|
25 |
+
<fieldset style="border:1px solid #ccc;margin-top:5px;padding:3px" id="<?php echo $this->prefix; ?>_listconfig">
|
26 |
+
<legend>List parameters*</legend>
|
27 |
+
Start list:<br />
|
28 |
+
<input type="text" class="non_available" id="<?php echo $this->prefix; ?>_list_start" name="<?php echo $this->prefix; ?>[list_start]" value=""/><br />
|
29 |
+
<div style="font-size:10px;">Examples: now, 10 September 2014, +1 day, +2 weeks. Leave blank if you don't need start list </div>
|
30 |
+
End list:<br />
|
31 |
+
<input type="text" class="non_available" id="<?php echo $this->prefix; ?>_list_end" name="<?php echo $this->prefix; ?>[list_end]" value=""/><br />
|
32 |
+
<div style="font-size:10px;">Examples: now, 10 September 2014, +1 day, +2 weeks. Leave blank if you don't need end list </div>
|
33 |
+
Order list:<br />
|
34 |
+
<select class="non_available" id="<?php echo $this->prefix; ?>_list_order" name="<?php echo $this->prefix; ?>[list_order]">
|
35 |
+
<option value="asc">Ascendent</option>
|
36 |
+
<option value="desc">Descendent</option>
|
37 |
+
</select><br />
|
38 |
+
Number of the events:<br />
|
39 |
+
<input type="text" class="non_available" id="<?php echo $this->prefix; ?>_list_totalEvents" name="<?php echo $this->prefix; ?>[list_totalEvents]" value="0"/><br />
|
40 |
+
<div style="font-size:10px;">Example: 3 for showing only three events without pagination. Leave zero if you want to show unlimited events</div>
|
41 |
+
Number of the events per page:<br />
|
42 |
+
<input type="text" class="non_available" id="<?php echo $this->prefix; ?>_list_eventsPerPage" name="<?php echo $this->prefix; ?>[list_eventsPerPage]" value="10"/><br />
|
43 |
+
Use readmore for more than "n" words in the description:<br />
|
44 |
+
<input type="text" class="non_available" id="<?php echo $this->prefix; ?>_list_readmore_numberofwords" name="<?php echo $this->prefix; ?>[list_readmore_numberofwords]" value="0"/><br />
|
45 |
+
<div style="font-size:10px;">Leave zero if you want to show the full description</div>
|
46 |
+
Theme list:<br />
|
47 |
+
<textarea class="non_available" id="<?php echo $this->prefix; ?>_theme_list" name="<?php echo $this->prefix; ?>[theme_list]" style="width:100%;height:200px;font-family:Courier;"><?php
|
48 |
+
$theme = '<div>
|
49 |
+
|
50 |
+
<div class="list_event_content" style="border-left:3px solid ${color};">
|
51 |
+
|
52 |
+
<div class="list_event_date" option="1${option}"><div class="list_date">${date_start}</div></div>
|
53 |
+
|
54 |
+
<div class="list_event_date" option="2${option}"><div class="list_date">${date_start}</div><div class="list_time">${time_start} - ${time_end}</div></div>
|
55 |
+
|
56 |
+
<div class="list_event_date" option="3${option}"><div class="list_date">${date_start} - ${date_end}</div></div>
|
57 |
+
|
58 |
+
<div class="list_event_date" option="4${option}"><div class="list_date">${date_start}</div><div class="list_time">${time_start}</div> - <div class="list_date">${date_end}</div><div class="list_time">${time_end}</div></div>
|
59 |
+
|
60 |
+
<div class="itemlist_title">${title}</div>
|
61 |
+
|
62 |
+
<div class="itemlist_location">${location}</div>
|
63 |
+
|
64 |
+
<div class="itemlist_description" readmore_url="">${description}</div>
|
65 |
+
|
66 |
+
</div>
|
67 |
+
|
68 |
+
</div>';
|
69 |
+
echo $theme;?></textarea>
|
70 |
+
<div style="font-size:10px;">Please change this html if you need a custom theme list.<br />You can use this data: ${color}, ${title}, ${location}, ${description}, ${date_start}, ${time_start}, ${date_start_year}, ${date_start_month}, ${date_start_day}, ${date_start_monthName}, ${date_start_monthNameLarge}, ${date_start_weekday}, ${date_end}, ${time_end, ${date_end_year}, ${date_end_month}, ${date_end_day}, ${date_end_monthName}, ${date_end_monthNameLarge}, ${date_end_weekday}</div>
|
71 |
+
</fieldset>
|
72 |
+
</div>
|
73 |
+
<b>* List view only available in the <a href="http://wordpress.dwbooster.com/calendars/cp-multi-view-calendar#download">Pro version.</a></b>
|
74 |
+
</td>
|
75 |
+
</tr>
|
76 |
+
<tr valign="top">
|
77 |
+
<th scope="row"><label>Default View</label></th>
|
78 |
+
<td><select id="<?php echo $this->prefix; ?>_viewdefault" name="<?php echo $this->prefix; ?>[viewdefault]">
|
79 |
+
<option value="day">Day</option>
|
80 |
+
<option value="week">Week</option>
|
81 |
+
<option value="month" selected="selected">Month</option>
|
82 |
+
<option value="nMonth">nMonth</option>
|
83 |
+
</select>
|
84 |
+
</td>
|
85 |
+
</tr>
|
86 |
+
<tr valign="top">
|
87 |
+
<th scope="row"><label>Start day of the week</label></th>
|
88 |
+
<td><select id="<?php echo $this->prefix; ?>_start_weekday" name="<?php echo $this->prefix; ?>[start_weekday]">
|
89 |
+
<option value="0" selected="selected">Sunday</option>
|
90 |
+
<option value="1">Monday</option>
|
91 |
+
<option value="2">Tuesday</option>
|
92 |
+
<option value="3">Wednesday</option>
|
93 |
+
<option value="4">Thursday</option>
|
94 |
+
<option value="5">Friday</option>
|
95 |
+
<option value="6">Saturday</option>
|
96 |
+
</select>
|
97 |
+
</td>
|
98 |
+
</tr>
|
99 |
+
<tr valign="top">
|
100 |
+
<th scope="row"><label>Css Style</label></th>
|
101 |
+
<td><select id="<?php echo $this->prefix; ?>_cssStyle" name="<?php echo $this->prefix; ?>[cssStyle]">
|
102 |
+
<option value="cupertino" selected="selected">Cupertino</option>
|
103 |
+
</select>
|
104 |
+
<br />
|
105 |
+
* Pro version has other additional 22 styles. <a href="http://wordpress.dwbooster.com/calendars/cp-multi-view-calendar">Click here to see all available styles</a>.
|
106 |
+
</td>
|
107 |
+
</tr>
|
108 |
+
<tr valign="top">
|
109 |
+
<th scope="row"><label>Palette Color</label></th>
|
110 |
+
<td><select id="<?php echo $this->prefix; ?>_palette" name="<?php echo $this->prefix; ?>[palette]" class="required">
|
111 |
+
<option value="0">Default</option>
|
112 |
+
<option value="1">Semaphore</option>
|
113 |
+
</select>
|
114 |
+
</td>
|
115 |
+
</tr>
|
116 |
+
<tr valign="top">
|
117 |
+
<th scope="row"><label>Allow edition</label></th>
|
118 |
+
<td><input type="checkbox" id="<?php echo $this->prefix; ?>_edition" name="<?php echo $this->prefix; ?>[edition]" value="true"/>
|
119 |
+
</td>
|
120 |
+
</tr>
|
121 |
+
<tr valign="top">
|
122 |
+
<th scope="row"><label>Other buttons</label></th>
|
123 |
+
<td>
|
124 |
+
<input type="checkbox" id="<?php echo $this->prefix; ?>_btoday" name="<?php echo $this->prefix; ?>[btoday]" value="true"/><label>Show Today Button</label>
|
125 |
+
<input type="checkbox" id="<?php echo $this->prefix; ?>_bnavigation" name="<?php echo $this->prefix; ?>[bnavigation]" value="true" checked="checked"/><label>Show Navigation Buttons</label>
|
126 |
+
<input type="checkbox" id="<?php echo $this->prefix; ?>_brefresh" name="<?php echo $this->prefix; ?>[brefresh]" value="true"/><label>Show Refresh Button</label>
|
127 |
+
</td>
|
128 |
+
</tr>
|
129 |
+
<tr valign="top">
|
130 |
+
<th scope="row"><label>Number of Months for nMonths View</label></th>
|
131 |
+
<td><select id="<?php echo $this->prefix; ?>_numberOfMonths" name="<?php echo $this->prefix; ?>[numberOfMonths]">
|
132 |
+
<option value="1">1</option>
|
133 |
+
<option value="2">2</option>
|
134 |
+
<option value="3">3</option>
|
135 |
+
<option value="4">4</option>
|
136 |
+
<option value="5">5</option>
|
137 |
+
<option value="6" selected="selected">6</option>
|
138 |
+
<option value="7">7</option>
|
139 |
+
<option value="8">8</option>
|
140 |
+
<option value="9">9</option>
|
141 |
+
<option value="10">10</option>
|
142 |
+
<option value="11">11</option>
|
143 |
+
<option value="12">12</option>
|
144 |
+
<option value="13">13</option>
|
145 |
+
<option value="14">14</option>
|
146 |
+
<option value="15">15</option>
|
147 |
+
<option value="16">16</option>
|
148 |
+
<option value="17">17</option>
|
149 |
+
<option value="18">18</option>
|
150 |
+
<option value="19">19</option>
|
151 |
+
<option value="20">20</option>
|
152 |
+
<option value="21">21</option>
|
153 |
+
<option value="22">22</option>
|
154 |
+
<option value="23">23</option>
|
155 |
+
<option value="24">24</option>
|
156 |
+
</select>
|
157 |
+
</td>
|
158 |
+
</tr>
|
159 |
+
<tr valign="top">
|
160 |
+
<th scope="row"><label>Tooltip Settings</label></th>
|
161 |
+
<td>
|
162 |
+
<script>function showhide(id){var obj1 = document.getElementById("<?php echo $this->prefix; ?>_showtooltip");var obj2 = document.getElementById("<?php echo $this->prefix; ?>_tooltipon");var obj3 = document.getElementById(id+"div");if ((obj1.checked) && (obj2.selectedIndex==1)) obj3.style.display = "none";else obj3.style.display = "";}</script>
|
163 |
+
<div>
|
164 |
+
<input type="checkbox" checked="checked" id="<?php echo $this->prefix; ?>_showtooltip" name="<?php echo $this->prefix; ?>[showtooltip]" value="true" onclick="javascript:showhide('mvparams')"/><span>Show tooltip on</span>
|
165 |
+
<select id="<?php echo $this->prefix; ?>_tooltipon" name="<?php echo $this->prefix; ?>[tooltipon]" onchange="javascript:showhide('mvparams')"><option value="0" >mouse over</option><option value="1" >click</option></select>
|
166 |
+
</div>
|
167 |
+
<label id="mvparams-lbl" class="hasTip"> </label>
|
168 |
+
<div id="mvparamsdiv">
|
169 |
+
<input type="checkbox" id="<?php echo $this->prefix; ?>_shownavigate" name="<?php echo $this->prefix; ?>[shownavigate]" value="true" />
|
170 |
+
<span>Go to the url</span>
|
171 |
+
<input type="text" id="<?php echo $this->prefix; ?>_url" name="<?php echo $this->prefix; ?>[url]" value=""/><label id="mvparams-lbl" class="hasTip"> </label>
|
172 |
+
<span>in</span>
|
173 |
+
<select id="<?php echo $this->prefix; ?>_target" name="<?php echo $this->prefix; ?>[target]"><option value="0" >new window</option><option value="1" >same window</option></select>
|
174 |
+
</div>
|
175 |
+
<script>showhide('mvparams')</script>
|
176 |
+
</td>
|
177 |
+
</tr>
|
178 |
+
<tr valign="top">
|
179 |
+
<th scope="row"><label>Other parameters</label></th>
|
180 |
+
<td>
|
181 |
+
<textarea name="<?php echo $this->prefix; ?>[otherparams]" id="<?php echo $this->prefix; ?>_otherparams" cols="40" rows="3"></textarea>
|
182 |
+
</td>
|
183 |
+
</tr>
|
184 |
+
<tr>
|
185 |
+
<td></td>
|
186 |
+
<td align="left">
|
187 |
+
<input type="button" onclick="return <?php echo $this->prefix; ?>saveCloseCalendar(this.form);" value="<?php _e('Save Calendar'); ?>" />
|
188 |
+
<input type="button" onclick="return <?php echo $this->prefix; ?>previewCalendar(this.form);" value="<?php _e('Save & Preview'); ?>" />
|
189 |
+
<input type="button" onclick="return <?php echo $this->prefix; ?>showCalendarArea();" value="<?php _e('Cancel'); ?>" />
|
190 |
+
</td>
|
191 |
+
</tr>
|
192 |
+
</table>
|
193 |
+
|
194 |
+
<div id="<?php echo $this->prefix; ?>calendarsarea">
|
195 |
+
<div id="<?php echo $this->prefix; ?>calendarslistarea"></div>
|
196 |
+
<br />
|
197 |
+
<input type="button" onclick="return <?php echo $this->prefix; ?>createNewCalendar(0);" value="<?php _e('Create New Calendar View'); ?>" />
|
198 |
+
|
199 |
+
<p>Note: To add events to the calendar go to the "<a href="admin.php?page=<?php echo $this->menu_parameter; ?>_manage">WordPress administration menu >> CP Multiview Calendar</a>" and on that page click the "<strong>Admin Calendar Data</strong>" button that leads to a page where you can add/edit/delete events on the calendar (just click over the desired dates).</p>
|
200 |
+
</div>
|
201 |
+
|
202 |
+
|
203 |
+
<div id="dialog" title="Calendar Preview" style="display:none">
|
204 |
+
<iframe frameborder="0" height="99%" width="99%" src="" id="<?php echo $this->prefix; ?>previewcalendarframe" name="<?php echo $this->prefix; ?>previewcalendarframe"></iframe>
|
205 |
+
</div>
|
206 |
+
|
207 |
+
<script type="text/javascript">
|
208 |
+
/** Populate functions */
|
209 |
+
function <?php echo $this->prefix; ?>_sel_sel(id,value)
|
210 |
+
{
|
211 |
+
var fld = document.getElementById("<?php echo $this->prefix; ?>_"+id);
|
212 |
+
for ( var i = 0; i < fld.options.length; i++ )
|
213 |
+
if ( fld.options[i].value == value ) {
|
214 |
+
fld.options[i].selected = true;
|
215 |
+
return;
|
216 |
+
}
|
217 |
+
}
|
218 |
+
function <?php echo $this->prefix; ?>_sel_chk(id,value)
|
219 |
+
{
|
220 |
+
if (value == 'true')
|
221 |
+
document.getElementById("<?php echo $this->prefix; ?>_"+id).checked = true;
|
222 |
+
else
|
223 |
+
document.getElementById("<?php echo $this->prefix; ?>_"+id).checked = false;
|
224 |
+
}
|
225 |
+
function <?php echo $this->prefix; ?>_sel_fld(id,value)
|
226 |
+
{
|
227 |
+
document.getElementById("<?php echo $this->prefix; ?>_"+id).value = value;
|
228 |
+
}
|
229 |
+
/** Display add new calendar view */
|
230 |
+
function <?php echo $this->prefix; ?>createNewCalendar(id)
|
231 |
+
{
|
232 |
+
document.getElementById("r<?php echo $this->prefix; ?>isediting").value = id;
|
233 |
+
document.getElementById("<?php echo $this->prefix; ?>createbox").style.display = "";
|
234 |
+
document.getElementById("<?php echo $this->prefix; ?>calendarsarea").style.display = "none";
|
235 |
+
}
|
236 |
+
/** Display calendar views */
|
237 |
+
function <?php echo $this->prefix; ?>showCalendarArea()
|
238 |
+
{
|
239 |
+
document.getElementById("<?php echo $this->prefix; ?>createbox").style.display = "none";
|
240 |
+
document.getElementById("<?php echo $this->prefix; ?>calendarsarea").style.display = "";
|
241 |
+
}
|
242 |
+
/** Ajax call add/update new calendar view */
|
243 |
+
function <?php echo $this->prefix; ?>saveCalendar(form)
|
244 |
+
{
|
245 |
+
var code = <?php echo $this->prefix; ?>Admin.getCode(form);
|
246 |
+
var $j = jQuery.noConflict();
|
247 |
+
var data = {
|
248 |
+
action: '<?php echo $this->prefix; ?>add_calendar',
|
249 |
+
security: '<?php echo $this->ajax_nonce; ?>',
|
250 |
+
viewid: form.r<?php echo $this->prefix; ?>isediting.value,
|
251 |
+
params: code
|
252 |
+
// falta mandar parametro ID para caso de update
|
253 |
+
};
|
254 |
+
$j("#<?php echo $this->prefix; ?>calendarslistarea")[0].innerHTML = '<?php _e("Loading..."); ?>';
|
255 |
+
$j.ajax({
|
256 |
+
type: 'POST',
|
257 |
+
url: ajaxurl,
|
258 |
+
data: data,
|
259 |
+
success: function(response) {
|
260 |
+
try {
|
261 |
+
$j("#<?php echo $this->prefix; ?>calendarslistarea")[0].innerHTML = response;
|
262 |
+
var head = document.getElementsByTagName("head")[0];
|
263 |
+
var sTag = document.createElement("script");
|
264 |
+
sTag.type = "text/javascript";
|
265 |
+
sTag.text = $j("#<?php echo $this->prefix; ?>scriptsarea")[0].innerHTML;
|
266 |
+
head.appendChild(sTag);
|
267 |
+
} catch (err) {}
|
268 |
+
},
|
269 |
+
async:false
|
270 |
+
});
|
271 |
+
}
|
272 |
+
function <?php echo $this->prefix; ?>saveCloseCalendar(form)
|
273 |
+
{
|
274 |
+
<?php echo $this->prefix; ?>saveCalendar(form);
|
275 |
+
<?php echo $this->prefix; ?>showCalendarArea();
|
276 |
+
}
|
277 |
+
/** Ajax call delete calendar view */
|
278 |
+
function <?php echo $this->prefix; ?>deleteCalendar(viewid)
|
279 |
+
{
|
280 |
+
var $j = jQuery.noConflict();
|
281 |
+
var data = {
|
282 |
+
action: '<?php echo $this->prefix; ?>delete_calendar',
|
283 |
+
security: '<?php echo $this->ajax_nonce; ?>',
|
284 |
+
id: viewid
|
285 |
+
};
|
286 |
+
$j("#<?php echo $this->prefix; ?>calendarslistarea")[0].innerHTML = '<?php _e("Loading..."); ?>';
|
287 |
+
$j.post(ajaxurl, data, function(response) {
|
288 |
+
try {
|
289 |
+
$j("#<?php echo $this->prefix; ?>calendarslistarea")[0].innerHTML = response;
|
290 |
+
var head = document.getElementsByTagName("head")[0];
|
291 |
+
var sTag = document.createElement("script");
|
292 |
+
sTag.type = "text/javascript";
|
293 |
+
sTag.text = $j("#<?php echo $this->prefix; ?>scriptsarea")[0].innerHTML;
|
294 |
+
head.appendChild(sTag);
|
295 |
+
} catch (err) {}
|
296 |
+
});
|
297 |
+
<?php echo $this->prefix; ?>showCalendarArea();
|
298 |
+
}
|
299 |
+
var <?php echo $this->prefix; ?>previewcount = <?php echo mt_rand(10000,999999); ?>;
|
300 |
+
function <?php echo $this->prefix; ?>previewCalendar(form)
|
301 |
+
{
|
302 |
+
<?php echo $this->prefix; ?>saveCalendar(form);
|
303 |
+
<?php echo $this->prefix; ?>previewCalendarId(form.r<?php echo $this->prefix; ?>isediting.value)
|
304 |
+
}
|
305 |
+
function <?php echo $this->prefix; ?>previewCalendarId(id)
|
306 |
+
{
|
307 |
+
<?php echo $this->prefix; ?>previewcount++;
|
308 |
+
document.getElementById("<?php echo $this->prefix; ?>previewcalendarframe").src = '<?php echo plugins_url('', __FILE__).'/../../../?cpmvc_do_action=preview&id='; ?>'+id+"&nc="+<?php echo $this->prefix; ?>previewcount;
|
309 |
+
var $j = jQuery.noConflict();
|
310 |
+
var wHeight = $j(window).height();
|
311 |
+
var dHeight = wHeight * 0.9;
|
312 |
+
$j( "#dialog" ).dialog({
|
313 |
+
'dialogClass' : 'wp-dialog',
|
314 |
+
'height': dHeight,
|
315 |
+
'width': '90%'
|
316 |
+
});
|
317 |
+
}
|
318 |
+
/** LOAD CALENDAR VIEWS LIST */
|
319 |
+
var $j = jQuery.noConflict();
|
320 |
+
$j("#<?php echo $this->prefix; ?>_viewList").click(function(){
|
321 |
+
if ($j(this).is(':checked'))
|
322 |
+
$j("#<?php echo $this->prefix; ?>_listconfig").css("display","block");
|
323 |
+
else
|
324 |
+
$j("#<?php echo $this->prefix; ?>_listconfig").css("display","none");
|
325 |
+
});
|
326 |
+
$j("#<?php echo $this->prefix; ?>_viewDay,#<?php echo $this->prefix; ?>_viewWeek,#<?php echo $this->prefix; ?>_viewMonth,#<?php echo $this->prefix; ?>_viewNMonth,#<?php echo $this->prefix; ?>_viewList").click(function(){
|
327 |
+
var options = "";
|
328 |
+
if ($j("#<?php echo $this->prefix; ?>_viewDay").is(':checked'))
|
329 |
+
options += '<option value="day">Day</option>';
|
330 |
+
if ($j("#<?php echo $this->prefix; ?>_viewWeek").is(':checked'))
|
331 |
+
options += '<option value="week">Week</option>';
|
332 |
+
if ($j("#<?php echo $this->prefix; ?>_viewMonth").is(':checked'))
|
333 |
+
options += '<option value="month">Month</option>';
|
334 |
+
if ($j("#<?php echo $this->prefix; ?>_viewNMonth").is(':checked'))
|
335 |
+
options += '<option value="nMonth">nMonth</option>';
|
336 |
+
if ($j("#<?php echo $this->prefix; ?>_viewList").is(':checked'))
|
337 |
+
options += '<option value="list">List</option>';
|
338 |
+
$j("#<?php echo $this->prefix; ?>_viewdefault").html(options);
|
339 |
+
});
|
340 |
+
var data = {
|
341 |
+
action: '<?php echo $this->prefix; ?>get_views',
|
342 |
+
security: '<?php echo $this->ajax_nonce; ?>'
|
343 |
+
};
|
344 |
+
$j("#<?php echo $this->prefix; ?>calendarslistarea")[0].innerHTML = '<?php _e("Loading..."); ?>';
|
345 |
+
$j.post(ajaxurl, data, function(response) {
|
346 |
+
try {
|
347 |
+
$j("#<?php echo $this->prefix; ?>calendarslistarea")[0].innerHTML = response;
|
348 |
+
var head = document.getElementsByTagName("head")[0];
|
349 |
+
var sTag = document.createElement("script");
|
350 |
+
sTag.type = "text/javascript";
|
351 |
+
sTag.text = $j("#<?php echo $this->prefix; ?>scriptsarea")[0].innerHTML;
|
352 |
+
head.appendChild(sTag);
|
353 |
+
} catch (err) {}
|
354 |
+
});
|
355 |
+
/** getting the shortcode and posting it to the editor */
|
356 |
+
var <?php echo $this->prefix; ?>CalendarAdmin = function () {}
|
357 |
+
<?php echo $this->prefix; ?>CalendarAdmin.prototype = {
|
358 |
+
options : {},
|
359 |
+
generateShortCode : function() {
|
360 |
+
var attrs = '';
|
361 |
+
jQuery.each(this['options'], function(name, value){
|
362 |
+
value = value.replace(/"/g,'#');
|
363 |
+
if (value != '') {attrs += '||||||' + name + '="' + value + '"';}
|
364 |
+
});
|
365 |
+
//return '[<?php echo $this->shorttag; ?>' + attrs + ']';
|
366 |
+
return attrs;
|
367 |
+
},
|
368 |
+
getCode : function(f) {
|
369 |
+
var collection = jQuery(f).find("input[id^=<?php echo $this->prefix; ?>]:not(input:checkbox),select[id^=<?php echo $this->prefix; ?>],textarea[id^=<?php echo $this->prefix; ?>]").not(".non_available");
|
370 |
+
/** input[id^=<?php echo $this->prefix; ?>]:checkbox:checked, */
|
371 |
+
var $this = this;
|
372 |
+
collection.each(function () {
|
373 |
+
var name = this.name.substring(<?php echo strlen($this->prefix)+1; ?>, this.name.length-1);
|
374 |
+
$this['options'][name] = this.value;
|
375 |
+
});
|
376 |
+
var shortcode = this.generateShortCode();
|
377 |
+
if (document.getElementById("<?php echo $this->prefix; ?>_viewDay").checked) shortcode = shortcode+'||||||viewDay="true"';
|
378 |
+
if (document.getElementById("<?php echo $this->prefix; ?>_viewWeek").checked) shortcode = shortcode+'||||||viewWeek="true"';
|
379 |
+
if (document.getElementById("<?php echo $this->prefix; ?>_viewMonth").checked) shortcode = shortcode+'||||||viewMonth="true"';
|
380 |
+
if (document.getElementById("<?php echo $this->prefix; ?>_viewNMonth").checked) shortcode = shortcode+'||||||viewNMonth="true"';
|
381 |
+
if (document.getElementById("<?php echo $this->prefix; ?>_edition").checked) shortcode = shortcode+'||||||edition="true"';
|
382 |
+
if (document.getElementById("<?php echo $this->prefix; ?>_btoday").checked) shortcode = shortcode+'||||||btoday="true"';
|
383 |
+
if (document.getElementById("<?php echo $this->prefix; ?>_bnavigation").checked) shortcode = shortcode+'||||||bnavigation="true"';
|
384 |
+
if (document.getElementById("<?php echo $this->prefix; ?>_brefresh").checked) shortcode = shortcode+'||||||brefresh="true"';
|
385 |
+
if (document.getElementById("<?php echo $this->prefix; ?>_showtooltip").checked) shortcode = shortcode+'||||||showtooltip="true"';
|
386 |
+
if (document.getElementById("<?php echo $this->prefix; ?>_shownavigate").checked) shortcode = shortcode+'||||||shownavigate="true"';
|
387 |
+
/** send_to_editor(shortcode); */
|
388 |
+
/**try {
|
389 |
+
var t = jQuery('#content');
|
390 |
+
if(t.length){
|
391 |
+
var v= t.val();
|
392 |
+
if(v.indexOf(shortcode) == -1)
|
393 |
+
t.val(v+shortcode);
|
394 |
+
}
|
395 |
+
|
396 |
+
} catch(e) {}*/
|
397 |
+
return shortcode;
|
398 |
+
},
|
399 |
+
sendToEditor : function(id,view) {
|
400 |
+
send_to_editor('[<?php echo $this->shorttag; ?> view="'+view+'"]');
|
401 |
+
try {
|
402 |
+
var t = jQuery('#content');
|
403 |
+
if(t.length){
|
404 |
+
var v= t.val();
|
405 |
+
if(v.indexOf(shortcode) == -1)
|
406 |
+
t.val(v+shortcode);
|
407 |
+
}
|
408 |
+
|
409 |
+
} catch(e) {}
|
410 |
+
//return false;
|
411 |
+
}
|
412 |
+
}
|
413 |
+
var <?php echo $this->prefix; ?>Admin = new <?php echo $this->prefix; ?>CalendarAdmin();
|
414 |
+
</script>
|
cp-multi-view-calendar.php
ADDED
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
Plugin Name: Calendar Event Multi View
|
4 |
+
Plugin URI: http://wordpress.dwbooster.com/calendars/cp-multi-view-calendar
|
5 |
+
Description: This plugin allows you to insert event calendars into your WP website.
|
6 |
+
Version: 1.2.48
|
7 |
+
Author: CodePeople.net
|
8 |
+
Author URI: http://codepeople.net
|
9 |
+
License: GPL
|
10 |
+
*/
|
11 |
+
|
12 |
+
|
13 |
+
/* initialization / install */
|
14 |
+
|
15 |
+
define('CP_MVC_DEFER_SCRIPTS_LOADING', (get_option('CP_MVC_LOAD_SCRIPTS',"0") == "1"?true:false));
|
16 |
+
|
17 |
+
include_once dirname( __FILE__ ) . '/classes/cp-base-class.inc.php';
|
18 |
+
include_once dirname( __FILE__ ) . '/cp-main-class.inc.php';
|
19 |
+
|
20 |
+
$cp_plugin = new CP_MultiViewCalendar;
|
21 |
+
register_activation_hook(__FILE__, array($cp_plugin,'install') );
|
22 |
+
add_action( 'plugins_loaded', array($cp_plugin, 'data_management'));
|
23 |
+
|
24 |
+
|
25 |
+
if ( is_admin() ) {
|
26 |
+
add_action('admin_enqueue_scripts', array($cp_plugin,'insert_adminScripts'), 1);
|
27 |
+
add_filter("plugin_action_links_".plugin_basename(__FILE__), array($cp_plugin,'plugin_page_links'));
|
28 |
+
add_action('admin_menu', array($cp_plugin,'admin_menu') );
|
29 |
+
} else {
|
30 |
+
add_shortcode( $cp_plugin->shorttag, array($cp_plugin, 'filter_content') );
|
31 |
+
}
|
32 |
+
|
33 |
+
?>
|
cp-public-int.inc.php
ADDED
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
if ( !$this )
|
4 |
+
{
|
5 |
+
echo 'Direct access not allowed.';
|
6 |
+
exit;
|
7 |
+
}
|
8 |
+
|
9 |
+
global $wpdb;
|
10 |
+
|
11 |
+
//print_r($atts);
|
12 |
+
|
13 |
+
//$myrows = $wpdb->get_results( "SELECT * FROM ".DEX_APPOINTMENTS_CONFIG_TABLE_NAME." WHERE published=1" );
|
14 |
+
|
15 |
+
@include dirname( __FILE__ ) . '/php/list.inc.php';
|
16 |
+
?>
|
17 |
+
<script type="text/javascript">//<!--
|
18 |
+
<?php echo $arrayJS_list; ?>
|
19 |
+
|
20 |
+
//-->
|
21 |
+
</script>
|
22 |
+
<link href="<?php echo plugins_url('/DC_MultiViewCal/css/'.$base_params["cssStyle"].'/calendar.css', __FILE__); ?>" type="text/css" rel="stylesheet" />
|
23 |
+
<link href="<?php echo plugins_url('/DC_MultiViewCal/css/main.css', __FILE__); ?>" type="text/css" rel="stylesheet" />
|
24 |
+
<noscript>The CP Multi View Event Calendar requires JavaScript enabled</noscript>
|
25 |
+
<div style="z-index:1000;" id="multicalendar">
|
26 |
+
<div id="cal1_<?php echo $this->print_counter; ?>" class="multicalendar"></div>
|
27 |
+
</div>
|
28 |
+
<div style="clear:both;"></div>
|
29 |
+
|
cp_ppp.php
DELETED
@@ -1,1452 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/*
|
3 |
-
Plugin Name: Payment Form for PayPal Pro
|
4 |
-
Plugin URI: http://wordpress.dwbooster.com/forms/paypal-payment-pro-form
|
5 |
-
Description: Payment Form for PayPal Pro to accept credit cards directly into your website. Official PayPal Partner.
|
6 |
-
Version: 1.0.8
|
7 |
-
Author: CodePeople.net
|
8 |
-
Author URI: http://codepeople.net
|
9 |
-
License: GPL
|
10 |
-
*/
|
11 |
-
|
12 |
-
|
13 |
-
/* initialization / install / uninstall functions */
|
14 |
-
|
15 |
-
|
16 |
-
// Payment Form for PayPal Pro constants
|
17 |
-
|
18 |
-
define('CP_PPP_DEFAULT_CURRENCY_SYMBOL','$');
|
19 |
-
define('CP_PPP_GBP_CURRENCY_SYMBOL',chr(163));
|
20 |
-
define('CP_PPP_EUR_CURRENCY_SYMBOL_A',chr(226)); //'EUR '
|
21 |
-
define('CP_PPP_EUR_CURRENCY_SYMBOL_B',chr(128));
|
22 |
-
|
23 |
-
define('CP_PPP_DEFAULT_DEFER_SCRIPTS_LOADING', (get_option('CP_CFPP_LOAD_SCRIPTS',"1") == "0"?true:false));
|
24 |
-
define('CP_PPP_DEFAULT_DEFER_SCRIPTS_LOADING_ADMIN', (get_option('CP_CFPP_LOAD_SCRIPTS_ADMIN',"1") == "1"?true:false));
|
25 |
-
|
26 |
-
define('CP_PPP_DEFAULT_form_structure', '[[{"form_identifier":"","name":"email","shortlabel":"","index":0,"ftype":"femail","userhelp":"","userhelpTooltip":false,"csslayout":"","title":"Email","predefined":"","predefinedClick":false,"required":true,"size":"medium","equalTo":"","fBuild":{}}],[{"title":"","description":"","formlayout":"top_aligned","formtemplate":"","evalequations":1,"autocomplete":1}]]');
|
27 |
-
|
28 |
-
define('CP_PPP_DEFAULT_fp_subject', 'Payment received...');
|
29 |
-
define('CP_PPP_DEFAULT_fp_inc_additional_info', 'true');
|
30 |
-
define('CP_PPP_DEFAULT_fp_return_page', get_site_url());
|
31 |
-
define('CP_PPP_DEFAULT_fp_message', "The following payment has been received:\n\n<"."%INFO%".">\n\n");
|
32 |
-
|
33 |
-
define('CP_PPP_DEFAULT_cu_enable_copy_to_user', 'true');
|
34 |
-
define('CP_PPP_DEFAULT_cu_user_email_field', '');
|
35 |
-
define('CP_PPP_DEFAULT_cu_subject', 'Confirmation: Message received...');
|
36 |
-
define('CP_PPP_DEFAULT_cu_message', "Thank you for your message. We will reply you as soon as possible.\n\nThis is a copy of the data sent:\n\n<"."%INFO%".">\n\nBest Regards.");
|
37 |
-
define('CP_PPP_DEFAULT_email_format','text');
|
38 |
-
|
39 |
-
define('CP_PPP_DEFAULT_vs_use_validation', 'true');
|
40 |
-
|
41 |
-
define('CP_PPP_DEFAULT_vs_text_is_required', 'This field is required.');
|
42 |
-
define('CP_PPP_DEFAULT_vs_text_is_email', 'Please enter a valid email address.');
|
43 |
-
|
44 |
-
define('CP_PPP_DEFAULT_vs_text_datemmddyyyy', 'Please enter a valid date with this format(mm/dd/yyyy)');
|
45 |
-
define('CP_PPP_DEFAULT_vs_text_dateddmmyyyy', 'Please enter a valid date with this format(dd/mm/yyyy)');
|
46 |
-
define('CP_PPP_DEFAULT_vs_text_number', 'Please enter a valid number.');
|
47 |
-
define('CP_PPP_DEFAULT_vs_text_digits', 'Please enter only digits.');
|
48 |
-
define('CP_PPP_DEFAULT_vs_text_max', 'Please enter a value less than or equal to {0}.');
|
49 |
-
define('CP_PPP_DEFAULT_vs_text_min', 'Please enter a value greater than or equal to {0}.');
|
50 |
-
|
51 |
-
|
52 |
-
define('CP_PPP_DEFAULT_cv_enable_captcha', 'true');
|
53 |
-
define('CP_PPP_DEFAULT_cv_width', '180');
|
54 |
-
define('CP_PPP_DEFAULT_cv_height', '60');
|
55 |
-
define('CP_PPP_DEFAULT_cv_chars', '5');
|
56 |
-
define('CP_PPP_DEFAULT_cv_font', 'font-1.ttf');
|
57 |
-
define('CP_PPP_DEFAULT_cv_min_font_size', '25');
|
58 |
-
define('CP_PPP_DEFAULT_cv_max_font_size', '35');
|
59 |
-
define('CP_PPP_DEFAULT_cv_noise', '200');
|
60 |
-
define('CP_PPP_DEFAULT_cv_noise_length', '4');
|
61 |
-
define('CP_PPP_DEFAULT_cv_background', 'ffffff');
|
62 |
-
define('CP_PPP_DEFAULT_cv_border', '000000');
|
63 |
-
define('CP_PPP_DEFAULT_cv_text_enter_valid_captcha', 'Please enter a valid captcha code.');
|
64 |
-
|
65 |
-
define('CP_PPP_PAYPAL_OPTION_YES', 'Pay with PayPal.');
|
66 |
-
define('CP_PPP_PAYPAL_OPTION_NO', 'Pay later.');
|
67 |
-
|
68 |
-
define('CP_PPP_DEFAULT_ENABLE_PAYPAL', 3);
|
69 |
-
define('CP_PPP_DEFAULT_PAYPAL_MODE', 'production');
|
70 |
-
define('CP_PPP_DEFAULT_PAYPAL_RECURRENT', '0');
|
71 |
-
define('CP_PPP_DEFAULT_PAYPAL_IDENTIFY_PRICES', '0');
|
72 |
-
define('CP_PPP_DEFAULT_PAYPAL_ZERO_PAYMENT', '0');
|
73 |
-
define('CP_PPP_DEFAULT_PAYPAL_EMAIL','put_your@email.here.com');
|
74 |
-
define('CP_PPP_DEFAULT_PRODUCT_NAME','Reservation');
|
75 |
-
define('CP_PPP_DEFAULT_COST','25');
|
76 |
-
define('CP_PPP_DEFAULT_CURRENCY','USD');
|
77 |
-
define('CP_PPP_DEFAULT_PAYPAL_LANGUAGE','EN');
|
78 |
-
|
79 |
-
// database
|
80 |
-
define('CP_PPP_FORMS_TABLE', 'cp_ppp_settings');
|
81 |
-
|
82 |
-
define('CP_PPP_DISCOUNT_CODES_TABLE_NAME_NO_PREFIX', "cp_ppp_discount_codes");
|
83 |
-
define('CP_PPP_DISCOUNT_CODES_TABLE_NAME', @$wpdb->prefix ."cp_ppp_discount_codes");
|
84 |
-
|
85 |
-
define('CP_PPP_POSTS_TABLE_NAME_NO_PREFIX', "cp_ppp_posts");
|
86 |
-
define('CP_PPP_POSTS_TABLE_NAME', @$wpdb->prefix ."cp_ppp_posts");
|
87 |
-
|
88 |
-
require_once 'cp_ppp_data_source.inc.php';
|
89 |
-
|
90 |
-
// end Payment Form for PayPal Pro constants
|
91 |
-
|
92 |
-
// code initialization, hooks
|
93 |
-
// -----------------------------------------
|
94 |
-
|
95 |
-
register_activation_hook(__FILE__,'cp_ppp_install');
|
96 |
-
|
97 |
-
add_action( 'init', 'cp_ppp_check_posted_data', 11 );
|
98 |
-
add_action( 'widgets_init', create_function('', 'return register_widget("CP_PPP_Widget");') );
|
99 |
-
|
100 |
-
function cpppp_plugin_init() {
|
101 |
-
load_plugin_textdomain( 'cpppp', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
|
102 |
-
}
|
103 |
-
add_action('plugins_loaded', 'cpppp_plugin_init');
|
104 |
-
|
105 |
-
|
106 |
-
if ( is_admin() ) {
|
107 |
-
add_action('media_buttons', 'set_cp_ppp_insert_button', 100);
|
108 |
-
add_action('admin_enqueue_scripts', 'set_cp_ppp_insert_adminScripts', 1);
|
109 |
-
add_action('admin_menu', 'cp_ppp_admin_menu');
|
110 |
-
|
111 |
-
$plugin = plugin_basename(__FILE__);
|
112 |
-
add_filter("plugin_action_links_".$plugin, 'cp_ppp_customAdjustmentsLink');
|
113 |
-
add_filter("plugin_action_links_".$plugin, 'cp_ppp_settingsLink');
|
114 |
-
add_filter("plugin_action_links_".$plugin, 'cp_ppp_helpLink');
|
115 |
-
|
116 |
-
function cp_ppp_admin_menu() {
|
117 |
-
add_options_page('Payment Form for PayPal Pro Options', 'Payment Form for PayPal Pro', 'manage_options', 'cp_ppp', 'cp_ppp_html_post_page' );
|
118 |
-
add_menu_page( 'Payment Form for PayPal Pro', 'Payment Form for PayPal Pro', 'read', 'cp_ppp', 'cp_ppp_html_post_page' );
|
119 |
-
|
120 |
-
add_submenu_page( 'cp_ppp', 'Manage Forms', 'Manage Forms', 'manage_options', "cp_ppp", 'cp_ppp_html_post_page' );
|
121 |
-
add_submenu_page( 'cp_ppp', 'Upgrade', 'Upgrade', 'edit_pages', "cp_ppp_upgrade", 'cp_ppp_html_post_page' );
|
122 |
-
}
|
123 |
-
} else { // if not admin
|
124 |
-
add_shortcode( 'CP_PPP', 'cp_ppp_filter_content' );
|
125 |
-
add_shortcode( 'CP_PPP_LIST', 'cp_ppp_filter_list' );
|
126 |
-
}
|
127 |
-
|
128 |
-
|
129 |
-
// functions
|
130 |
-
//------------------------------------------
|
131 |
-
|
132 |
-
function cp_ppp_install($networkwide) {
|
133 |
-
global $wpdb;
|
134 |
-
|
135 |
-
if (function_exists('is_multisite') && is_multisite()) {
|
136 |
-
// check if it is a network activation - if so, run the activation function for each blog id
|
137 |
-
if ($networkwide) {
|
138 |
-
$old_blog = $wpdb->blogid;
|
139 |
-
// Get all blog ids
|
140 |
-
$blogids = $wpdb->get_col("SELECT blog_id FROM $wpdb->blogs");
|
141 |
-
foreach ($blogids as $blog_id) {
|
142 |
-
switch_to_blog($blog_id);
|
143 |
-
_cp_ppp_install();
|
144 |
-
}
|
145 |
-
switch_to_blog($old_blog);
|
146 |
-
return;
|
147 |
-
}
|
148 |
-
}
|
149 |
-
_cp_ppp_install();
|
150 |
-
}
|
151 |
-
|
152 |
-
function _cp_ppp_install() {
|
153 |
-
global $wpdb;
|
154 |
-
|
155 |
-
define('CP_PPP_DEFAULT_fp_from_email', get_the_author_meta('user_email', get_current_user_id()) );
|
156 |
-
define('CP_PPP_DEFAULT_fp_destination_emails', CP_PPP_DEFAULT_fp_from_email);
|
157 |
-
|
158 |
-
$table_name = $wpdb->prefix.CP_PPP_FORMS_TABLE;
|
159 |
-
|
160 |
-
$sql = "CREATE TABLE ".$wpdb->prefix.CP_PPP_POSTS_TABLE_NAME_NO_PREFIX." (
|
161 |
-
id mediumint(9) NOT NULL AUTO_INCREMENT,
|
162 |
-
formid INT NOT NULL,
|
163 |
-
time datetime DEFAULT '0000-00-00 00:00:00' NOT NULL,
|
164 |
-
ipaddr VARCHAR(32) DEFAULT '' NOT NULL,
|
165 |
-
notifyto VARCHAR(250) DEFAULT '' NOT NULL,
|
166 |
-
data mediumtext,
|
167 |
-
paypal_post mediumtext,
|
168 |
-
posted_data mediumtext,
|
169 |
-
paid INT DEFAULT 0 NOT NULL,
|
170 |
-
UNIQUE KEY id (id)
|
171 |
-
);";
|
172 |
-
$wpdb->query( $wpdb->prepare ($sql, array()) );
|
173 |
-
|
174 |
-
$sql = "CREATE TABLE ".$wpdb->prefix.CP_PPP_DISCOUNT_CODES_TABLE_NAME_NO_PREFIX." (
|
175 |
-
id mediumint(9) NOT NULL AUTO_INCREMENT,
|
176 |
-
form_id mediumint(9) NOT NULL DEFAULT 1,
|
177 |
-
code VARCHAR(250) DEFAULT '' NOT NULL,
|
178 |
-
discount VARCHAR(250) DEFAULT '' NOT NULL,
|
179 |
-
dc_times VARCHAR(10) DEFAULT '0' NOT NULL,
|
180 |
-
expires datetime DEFAULT '0000-00-00 00:00:00' NOT NULL,
|
181 |
-
availability int(10) unsigned NOT NULL DEFAULT 0,
|
182 |
-
used int(10) unsigned NOT NULL DEFAULT 0,
|
183 |
-
UNIQUE KEY id (id)
|
184 |
-
);";
|
185 |
-
$wpdb->query( $wpdb->prepare ($sql, array()) );
|
186 |
-
|
187 |
-
|
188 |
-
$sql = "CREATE TABLE $table_name (
|
189 |
-
id mediumint(9) NOT NULL AUTO_INCREMENT,
|
190 |
-
|
191 |
-
form_name VARCHAR(250) DEFAULT '' NOT NULL,
|
192 |
-
|
193 |
-
form_structure mediumtext,
|
194 |
-
|
195 |
-
fp_from_email VARCHAR(250) DEFAULT '' NOT NULL,
|
196 |
-
fp_destination_emails text,
|
197 |
-
fp_subject VARCHAR(250) DEFAULT '' NOT NULL,
|
198 |
-
fp_inc_additional_info VARCHAR(10) DEFAULT '' NOT NULL,
|
199 |
-
fp_return_page VARCHAR(250) DEFAULT '' NOT NULL,
|
200 |
-
fp_message text,
|
201 |
-
fp_emailformat VARCHAR(10) DEFAULT '' NOT NULL,
|
202 |
-
|
203 |
-
cu_enable_copy_to_user VARCHAR(10) DEFAULT '' NOT NULL,
|
204 |
-
cu_user_email_field VARCHAR(250) DEFAULT '' NOT NULL,
|
205 |
-
cu_subject VARCHAR(250) DEFAULT '' NOT NULL,
|
206 |
-
cu_message text,
|
207 |
-
cu_emailformat VARCHAR(10) DEFAULT '' NOT NULL,
|
208 |
-
|
209 |
-
enable_paypal_option_yes VARCHAR(250) DEFAULT '' NOT NULL,
|
210 |
-
enable_paypal_option_no VARCHAR(250) DEFAULT '' NOT NULL,
|
211 |
-
paypal_recurrent_setup VARCHAR(20) DEFAULT '' NOT NULL,
|
212 |
-
vs_use_validation VARCHAR(10) DEFAULT '' NOT NULL,
|
213 |
-
vs_text_is_required VARCHAR(250) DEFAULT '' NOT NULL,
|
214 |
-
vs_text_is_email VARCHAR(250) DEFAULT '' NOT NULL,
|
215 |
-
vs_text_datemmddyyyy VARCHAR(250) DEFAULT '' NOT NULL,
|
216 |
-
vs_text_dateddmmyyyy VARCHAR(250) DEFAULT '' NOT NULL,
|
217 |
-
vs_text_number VARCHAR(250) DEFAULT '' NOT NULL,
|
218 |
-
vs_text_digits VARCHAR(250) DEFAULT '' NOT NULL,
|
219 |
-
vs_text_max VARCHAR(250) DEFAULT '' NOT NULL,
|
220 |
-
vs_text_min VARCHAR(250) DEFAULT '' NOT NULL,
|
221 |
-
vs_text_submitbtn VARCHAR(250) DEFAULT '' NOT NULL,
|
222 |
-
vs_text_previousbtn VARCHAR(250) DEFAULT '' NOT NULL,
|
223 |
-
vs_text_nextbtn VARCHAR(250) DEFAULT '' NOT NULL,
|
224 |
-
|
225 |
-
enable_paypal varchar(10) DEFAULT '' NOT NULL,
|
226 |
-
paypal_notiemails varchar(10) DEFAULT '' NOT NULL,
|
227 |
-
paypal_email varchar(255) DEFAULT '' NOT NULL ,
|
228 |
-
request_cost varchar(255) DEFAULT '' NOT NULL ,
|
229 |
-
paypal_price_field varchar(255) DEFAULT '' NOT NULL ,
|
230 |
-
request_taxes varchar(20) DEFAULT '' NOT NULL ,
|
231 |
-
request_address varchar(20) DEFAULT '' NOT NULL ,
|
232 |
-
paypal_product_name varchar(255) DEFAULT '' NOT NULL,
|
233 |
-
currency varchar(10) DEFAULT '' NOT NULL,
|
234 |
-
paypal_language varchar(10) DEFAULT '' NOT NULL,
|
235 |
-
paypal_mode varchar(20) DEFAULT '' NOT NULL ,
|
236 |
-
paypal_recurrent varchar(20) DEFAULT '' NOT NULL ,
|
237 |
-
paypal_identify_prices varchar(20) DEFAULT '' NOT NULL ,
|
238 |
-
paypal_zero_payment varchar(10) DEFAULT '' NOT NULL ,
|
239 |
-
|
240 |
-
paypalpro_api_username varchar(255) DEFAULT '' NOT NULL ,
|
241 |
-
paypalpro_api_password varchar(255) DEFAULT '' NOT NULL ,
|
242 |
-
paypalpro_api_signature varchar(255) DEFAULT '' NOT NULL ,
|
243 |
-
|
244 |
-
cp_user_access text,
|
245 |
-
|
246 |
-
script_load_method varchar(10) DEFAULT '' NOT NULL ,
|
247 |
-
|
248 |
-
cv_enable_captcha VARCHAR(20) DEFAULT '' NOT NULL,
|
249 |
-
cv_width VARCHAR(20) DEFAULT '' NOT NULL,
|
250 |
-
cv_height VARCHAR(20) DEFAULT '' NOT NULL,
|
251 |
-
cv_chars VARCHAR(20) DEFAULT '' NOT NULL,
|
252 |
-
cv_font VARCHAR(20) DEFAULT '' NOT NULL,
|
253 |
-
cv_min_font_size VARCHAR(20) DEFAULT '' NOT NULL,
|
254 |
-
cv_max_font_size VARCHAR(20) DEFAULT '' NOT NULL,
|
255 |
-
cv_noise VARCHAR(20) DEFAULT '' NOT NULL,
|
256 |
-
cv_noise_length VARCHAR(20) DEFAULT '' NOT NULL,
|
257 |
-
cv_background VARCHAR(20) DEFAULT '' NOT NULL,
|
258 |
-
cv_border VARCHAR(20) DEFAULT '' NOT NULL,
|
259 |
-
cv_text_enter_valid_captcha VARCHAR(200) DEFAULT '' NOT NULL,
|
260 |
-
|
261 |
-
UNIQUE KEY id (id)
|
262 |
-
);";
|
263 |
-
$wpdb->query( $wpdb->prepare ($sql, array()) );
|
264 |
-
|
265 |
-
$count = $wpdb->get_var( "SELECT COUNT(id) FROM ".$table_name );
|
266 |
-
if (!$count)
|
267 |
-
{
|
268 |
-
$wpdb->insert( $table_name, array( 'id' => 1,
|
269 |
-
'form_name' => 'Form 1',
|
270 |
-
|
271 |
-
'form_structure' => cp_ppp_get_option('form_structure', CP_PPP_DEFAULT_form_structure),
|
272 |
-
|
273 |
-
'fp_from_email' => cp_ppp_get_option('fp_from_email', CP_PPP_DEFAULT_fp_from_email),
|
274 |
-
'fp_destination_emails' => cp_ppp_get_option('fp_destination_emails', CP_PPP_DEFAULT_fp_destination_emails),
|
275 |
-
'fp_subject' => cp_ppp_get_option('fp_subject', CP_PPP_DEFAULT_fp_subject),
|
276 |
-
'fp_inc_additional_info' => cp_ppp_get_option('fp_inc_additional_info', CP_PPP_DEFAULT_fp_inc_additional_info),
|
277 |
-
'fp_return_page' => cp_ppp_get_option('fp_return_page', CP_PPP_DEFAULT_fp_return_page),
|
278 |
-
'fp_message' => cp_ppp_get_option('fp_message', CP_PPP_DEFAULT_fp_message),
|
279 |
-
'fp_emailformat' => cp_ppp_get_option('fp_emailformat', CP_PPP_DEFAULT_email_format),
|
280 |
-
|
281 |
-
'cu_enable_copy_to_user' => cp_ppp_get_option('cu_enable_copy_to_user', CP_PPP_DEFAULT_cu_enable_copy_to_user),
|
282 |
-
'cu_user_email_field' => cp_ppp_get_option('cu_user_email_field', CP_PPP_DEFAULT_cu_user_email_field),
|
283 |
-
'cu_subject' => cp_ppp_get_option('cu_subject', CP_PPP_DEFAULT_cu_subject),
|
284 |
-
'cu_message' => cp_ppp_get_option('cu_message', CP_PPP_DEFAULT_cu_message),
|
285 |
-
'cu_emailformat' => cp_ppp_get_option('cu_emailformat', CP_PPP_DEFAULT_email_format),
|
286 |
-
|
287 |
-
'vs_use_validation' => cp_ppp_get_option('vs_use_validation', CP_PPP_DEFAULT_vs_use_validation),
|
288 |
-
'vs_text_is_required' => cp_ppp_get_option('vs_text_is_required', CP_PPP_DEFAULT_vs_text_is_required),
|
289 |
-
'vs_text_is_email' => cp_ppp_get_option('vs_text_is_email', CP_PPP_DEFAULT_vs_text_is_email),
|
290 |
-
'vs_text_datemmddyyyy' => cp_ppp_get_option('vs_text_datemmddyyyy', CP_PPP_DEFAULT_vs_text_datemmddyyyy),
|
291 |
-
'vs_text_dateddmmyyyy' => cp_ppp_get_option('vs_text_dateddmmyyyy', CP_PPP_DEFAULT_vs_text_dateddmmyyyy),
|
292 |
-
'vs_text_number' => cp_ppp_get_option('vs_text_number', CP_PPP_DEFAULT_vs_text_number),
|
293 |
-
'vs_text_digits' => cp_ppp_get_option('vs_text_digits', CP_PPP_DEFAULT_vs_text_digits),
|
294 |
-
'vs_text_max' => cp_ppp_get_option('vs_text_max', CP_PPP_DEFAULT_vs_text_max),
|
295 |
-
'vs_text_min' => cp_ppp_get_option('vs_text_min', CP_PPP_DEFAULT_vs_text_min),
|
296 |
-
'vs_text_submitbtn' => cp_ppp_get_option('vs_text_submitbtn', 'Submit'),
|
297 |
-
'vs_text_previousbtn' => cp_ppp_get_option('vs_text_previousbtn', 'Previous'),
|
298 |
-
'vs_text_nextbtn' => cp_ppp_get_option('vs_text_nextbtn', 'Next'),
|
299 |
-
|
300 |
-
'script_load_method' => cp_ppp_get_option('script_load_method', '0'),
|
301 |
-
|
302 |
-
'enable_paypal' => cp_ppp_get_option('enable_paypal', CP_PPP_DEFAULT_ENABLE_PAYPAL),
|
303 |
-
'paypal_notiemails' => cp_ppp_get_option('paypal_notiemails', '0'),
|
304 |
-
'paypal_email' => cp_ppp_get_option('paypal_email', CP_PPP_DEFAULT_PAYPAL_EMAIL),
|
305 |
-
'request_cost' => cp_ppp_get_option('request_cost', CP_PPP_DEFAULT_COST),
|
306 |
-
'paypal_price_field' => cp_ppp_get_option('paypal_price_field', ''),
|
307 |
-
'request_taxes' => cp_ppp_get_option('request_taxes', '0'),
|
308 |
-
'request_address' => cp_ppp_get_option('request_address', '0'),
|
309 |
-
'paypal_product_name' => cp_ppp_get_option('paypal_product_name', CP_PPP_DEFAULT_PRODUCT_NAME),
|
310 |
-
'currency' => cp_ppp_get_option('currency', CP_PPP_DEFAULT_CURRENCY),
|
311 |
-
'paypal_language' => cp_ppp_get_option('paypal_language', CP_PPP_DEFAULT_PAYPAL_LANGUAGE),
|
312 |
-
'paypal_mode' => cp_ppp_get_option('paypal_mode', CP_PPP_DEFAULT_PAYPAL_MODE),
|
313 |
-
'paypal_recurrent' => cp_ppp_get_option('paypal_recurrent', CP_PPP_DEFAULT_PAYPAL_RECURRENT),
|
314 |
-
'paypal_identify_prices' => cp_ppp_get_option('paypal_identify_prices', CP_PPP_DEFAULT_PAYPAL_IDENTIFY_PRICES),
|
315 |
-
'paypal_zero_payment' => cp_ppp_get_option('paypal_zero_payment', CP_PPP_DEFAULT_PAYPAL_ZERO_PAYMENT),
|
316 |
-
|
317 |
-
'cv_enable_captcha' => cp_ppp_get_option('cv_enable_captcha', CP_PPP_DEFAULT_cv_enable_captcha),
|
318 |
-
'cv_width' => cp_ppp_get_option('cv_width', CP_PPP_DEFAULT_cv_width),
|
319 |
-
'cv_height' => cp_ppp_get_option('cv_height', CP_PPP_DEFAULT_cv_height),
|
320 |
-
'cv_chars' => cp_ppp_get_option('cv_chars', CP_PPP_DEFAULT_cv_chars),
|
321 |
-
'cv_font' => cp_ppp_get_option('cv_font', CP_PPP_DEFAULT_cv_font),
|
322 |
-
'cv_min_font_size' => cp_ppp_get_option('cv_min_font_size', CP_PPP_DEFAULT_cv_min_font_size),
|
323 |
-
'cv_max_font_size' => cp_ppp_get_option('cv_max_font_size', CP_PPP_DEFAULT_cv_max_font_size),
|
324 |
-
'cv_noise' => cp_ppp_get_option('cv_noise', CP_PPP_DEFAULT_cv_noise),
|
325 |
-
'cv_noise_length' => cp_ppp_get_option('cv_noise_length', CP_PPP_DEFAULT_cv_noise_length),
|
326 |
-
'cv_background' => cp_ppp_get_option('cv_background', CP_PPP_DEFAULT_cv_background),
|
327 |
-
'cv_border' => cp_ppp_get_option('cv_border', CP_PPP_DEFAULT_cv_border),
|
328 |
-
'cv_text_enter_valid_captcha' => cp_ppp_get_option('cv_text_enter_valid_captcha', CP_PPP_DEFAULT_cv_text_enter_valid_captcha)
|
329 |
-
)
|
330 |
-
);
|
331 |
-
}
|
332 |
-
|
333 |
-
}
|
334 |
-
|
335 |
-
function cp_ppp_filter_list($atts) {
|
336 |
-
global $wpdb;
|
337 |
-
extract( shortcode_atts( array(
|
338 |
-
'id' => '',
|
339 |
-
'from' => 'today -30 days',
|
340 |
-
'to' => 'today +30 days',
|
341 |
-
'fields' => 'time,email,fieldname1,fieldname2',
|
342 |
-
), $atts ) );
|
343 |
-
ob_start();
|
344 |
-
|
345 |
-
$from = date("Y-m-d 00:00:00", strtotime($from));
|
346 |
-
$to = date("Y-m-d 23:59:59", strtotime($to));
|
347 |
-
$cond = "(`time` >= '".esc_sql($from)."')";
|
348 |
-
$cond .= " AND (`time` <= '".esc_sql($to)."')";
|
349 |
-
|
350 |
-
if ($id != '')
|
351 |
-
$myrows = $wpdb->get_results( $wpdb->prepare("SELECT * FROM ".$wpdb->prefix.CP_PPP_FORMS_TABLE." WHERE id=%d",$id) );
|
352 |
-
else
|
353 |
-
$myrows = $wpdb->get_results( $wpdb->prepare("SELECT * FROM ".$wpdb->prefix.CP_PPP_FORMS_TABLE,array()) );
|
354 |
-
|
355 |
-
|
356 |
-
if ($id == '') $id = $myrows[0]->id;
|
357 |
-
$cond = "(`formid` = %d)";
|
358 |
-
|
359 |
-
$events = $wpdb->get_results( $wpdb->prepare(
|
360 |
-
"SELECT * FROM ".CP_PPP_POSTS_TABLE_NAME." WHERE ".$cond." ORDER BY `time` DESC",
|
361 |
-
$id
|
362 |
-
)
|
363 |
-
);
|
364 |
-
|
365 |
-
$fields = explode(",",$fields);
|
366 |
-
|
367 |
-
for ($k=0; $k<count($fields); $k++)
|
368 |
-
$fields[$k] = trim($fields[$k]);
|
369 |
-
|
370 |
-
wp_enqueue_style ('cp_ppp_buikder_script_f_list_styles', plugins_url('css/stylepublic.css', __FILE__));
|
371 |
-
foreach ($events as $event)
|
372 |
-
{
|
373 |
-
$posted_data = unserialize($event->posted_data);
|
374 |
-
|
375 |
-
for ($k=0;$k<count($fields); $k++)
|
376 |
-
if ($fields[$k] == 'time')
|
377 |
-
echo '<div class="cfpp_field_'.$k.'">'.date("Y-m-d H:i:s", strtotime($event->time) ).'</div>';
|
378 |
-
else
|
379 |
-
echo '<div class="cfpp_field_'.$k.'">'.(isset($posted_data[$fields[$k]])?$posted_data[$fields[$k]]:" ").'</div>';
|
380 |
-
echo '<div class="cfpp_field_clear"></div>';
|
381 |
-
}
|
382 |
-
|
383 |
-
$buffered_contents = ob_get_contents();
|
384 |
-
ob_end_clean();
|
385 |
-
return $buffered_contents;
|
386 |
-
}
|
387 |
-
|
388 |
-
function cp_ppp_available_templates(){
|
389 |
-
global $CP_CFPP_global_templates;
|
390 |
-
|
391 |
-
if( empty( $CP_CFPP_global_templates ) )
|
392 |
-
{
|
393 |
-
// Get available designs
|
394 |
-
$tpls_dir = dir( plugin_dir_path( __FILE__ ).'templates' );
|
395 |
-
$CP_CFPP_global_templates = array();
|
396 |
-
while( false !== ( $entry = $tpls_dir->read() ) )
|
397 |
-
{
|
398 |
-
if ( $entry != '.' && $entry != '..' && is_dir( $tpls_dir->path.'/'.$entry ) && file_exists( $tpls_dir->path.'/'.$entry.'/config.ini' ) )
|
399 |
-
{
|
400 |
-
if( ( $ini_array = parse_ini_file( $tpls_dir->path.'/'.$entry.'/config.ini' ) ) !== false )
|
401 |
-
{
|
402 |
-
if( !empty( $ini_array[ 'file' ] ) ) $ini_array[ 'file' ] = plugins_url( 'templates/'.$entry.'/'.$ini_array[ 'file' ], __FILE__ );
|
403 |
-
if( !empty( $ini_array[ 'thumbnail' ] ) ) $ini_array[ 'thumbnail' ] = plugins_url( 'templates/'.$entry.'/'.$ini_array[ 'thumbnail' ], __FILE__ );
|
404 |
-
$CP_CFPP_global_templates[ $ini_array[ 'prefix' ] ] = $ini_array;
|
405 |
-
}
|
406 |
-
}
|
407 |
-
}
|
408 |
-
}
|
409 |
-
|
410 |
-
return $CP_CFPP_global_templates;
|
411 |
-
}
|
412 |
-
|
413 |
-
function cp_ppp_filter_content($atts) {
|
414 |
-
global $wpdb;
|
415 |
-
extract( shortcode_atts( array(
|
416 |
-
'id' => '',
|
417 |
-
), $atts ) );
|
418 |
-
//if ($id != '')
|
419 |
-
// define ('CP_PPP_ID',$id);
|
420 |
-
ob_start();
|
421 |
-
cp_ppp_get_public_form($id);
|
422 |
-
$buffered_contents = ob_get_contents();
|
423 |
-
ob_end_clean();
|
424 |
-
return $buffered_contents;
|
425 |
-
}
|
426 |
-
|
427 |
-
$CP_CFPP_global_form_count_number = 0;
|
428 |
-
$CP_CPP_global_form_count = "_".$CP_CFPP_global_form_count_number;
|
429 |
-
|
430 |
-
function cp_ppp_get_public_form($id) {
|
431 |
-
global $wpdb;
|
432 |
-
global $CP_CPP_global_form_count;
|
433 |
-
global $CP_CFPP_global_form_count_number;
|
434 |
-
$CP_CFPP_global_form_count_number++;
|
435 |
-
$CP_CPP_global_form_count = "_".$CP_CFPP_global_form_count_number;
|
436 |
-
if (!defined('CP_AUTH_INCLUDE')) define('CP_AUTH_INCLUDE', true);
|
437 |
-
|
438 |
-
if ($id != '')
|
439 |
-
$myrows = $wpdb->get_results( $wpdb->prepare("SELECT * FROM ".$wpdb->prefix.CP_PPP_FORMS_TABLE." WHERE id=%d", $id) );
|
440 |
-
else
|
441 |
-
$myrows = $wpdb->get_results( "SELECT * FROM ".$wpdb->prefix.CP_PPP_FORMS_TABLE );
|
442 |
-
|
443 |
-
$previous_label = cp_ppp_get_option('vs_text_previousbtn', 'Previous',$id);
|
444 |
-
$previous_label = ($previous_label==''?'Previous':$previous_label);
|
445 |
-
$next_label = cp_ppp_get_option('vs_text_nextbtn', 'Next',$id);
|
446 |
-
$next_label = ($next_label==''?'Next':$next_label);
|
447 |
-
if ($id == '') $id = $myrows[0]->id;
|
448 |
-
if (CP_PPP_DEFAULT_DEFER_SCRIPTS_LOADING)
|
449 |
-
{
|
450 |
-
wp_deregister_script('query-stringify');
|
451 |
-
wp_register_script('query-stringify', plugins_url('/js/jQuery.stringify.js', __FILE__));
|
452 |
-
|
453 |
-
wp_deregister_script('cp_ppp_validate_script');
|
454 |
-
wp_register_script('cp_ppp_validate_script', plugins_url('/js/jquery.validate.js', __FILE__));
|
455 |
-
|
456 |
-
wp_enqueue_script( 'cp_ppp_buikder_script',
|
457 |
-
get_site_url( get_current_blog_id() ).'?cp_ppp_resources=public',array("jquery","jquery-ui-core","jquery-ui-datepicker","jquery-ui-widget","jquery-ui-position","jquery-ui-tooltip","query-stringify","cp_ppp_validate_script"), false, true );
|
458 |
-
|
459 |
-
|
460 |
-
wp_localize_script('cp_ppp_buikder_script', 'cp_ppp_fbuilder_config'.$CP_CPP_global_form_count, array('obj' =>
|
461 |
-
'{"pub":true,"identifier":"'.$CP_CPP_global_form_count.'","messages": {
|
462 |
-
"required": "'.str_replace(array('"'),array('\\"'),cp_ppp_get_option('vs_text_is_required', CP_PPP_DEFAULT_vs_text_is_required,$id)).'",
|
463 |
-
"email": "'.str_replace(array('"'),array('\\"'),cp_ppp_get_option('vs_text_is_email', CP_PPP_DEFAULT_vs_text_is_email,$id)).'",
|
464 |
-
"datemmddyyyy": "'.str_replace(array('"'),array('\\"'),cp_ppp_get_option('vs_text_datemmddyyyy', CP_PPP_DEFAULT_vs_text_datemmddyyyy,$id)).'",
|
465 |
-
"dateddmmyyyy": "'.str_replace(array('"'),array('\\"'),cp_ppp_get_option('vs_text_dateddmmyyyy', CP_PPP_DEFAULT_vs_text_dateddmmyyyy,$id)).'",
|
466 |
-
"number": "'.str_replace(array('"'),array('\\"'),cp_ppp_get_option('vs_text_number', CP_PPP_DEFAULT_vs_text_number,$id)).'",
|
467 |
-
"digits": "'.str_replace(array('"'),array('\\"'),cp_ppp_get_option('vs_text_digits', CP_PPP_DEFAULT_vs_text_digits,$id)).'",
|
468 |
-
"max": "'.str_replace(array('"'),array('\\"'),cp_ppp_get_option('vs_text_max', CP_PPP_DEFAULT_vs_text_max,$id)).'",
|
469 |
-
"min": "'.str_replace(array('"'),array('\\"'),cp_ppp_get_option('vs_text_min', CP_PPP_DEFAULT_vs_text_min,$id)).'",
|
470 |
-
"previous": "'.str_replace(array('"'),array('\\"'),$previous_label).'",
|
471 |
-
"next": "'.str_replace(array('"'),array('\\"'),$next_label).'"
|
472 |
-
}}'
|
473 |
-
));
|
474 |
-
}
|
475 |
-
else
|
476 |
-
{
|
477 |
-
wp_enqueue_script( "jquery" );
|
478 |
-
wp_enqueue_script( "jquery-ui-core" );
|
479 |
-
wp_enqueue_script( "jquery-ui-datepicker" );
|
480 |
-
}
|
481 |
-
|
482 |
-
wp_enqueue_style ('cp_ppp_buikder_script_f_p_styles', plugins_url('css/stylepublic.css', __FILE__));
|
483 |
-
wp_enqueue_style('cp_ppp_buikder_script_jq_styles', plugins_url('css/cupertino/jquery-ui-1.8.20.custom.css', __FILE__));
|
484 |
-
|
485 |
-
$codes = array();
|
486 |
-
|
487 |
-
$button_label = cp_ppp_get_option('vs_text_submitbtn', 'Submit',$id);
|
488 |
-
$button_label = ($button_label==''?'Submit':$button_label);
|
489 |
-
@include dirname( __FILE__ ) . '/cp_ppp_public_int.inc.php';
|
490 |
-
if (!CP_PPP_DEFAULT_DEFER_SCRIPTS_LOADING) {
|
491 |
-
$prefix_ui = '';
|
492 |
-
if (file_exists(dirname( __FILE__ ).'/../../../wp-includes/js/jquery/ui/jquery.ui.core.min.js'))
|
493 |
-
$prefix_ui = 'jquery.ui.';
|
494 |
-
?>
|
495 |
-
<?php $plugin_url = plugins_url('', __FILE__); ?>
|
496 |
-
<script> if( typeof jQuery != 'undefined' ) var jQueryBK = jQuery.noConflict(); </script>
|
497 |
-
<script type='text/javascript' src='<?php echo $plugin_url.'/../../../wp-includes/js/jquery/jquery.js'; ?>'></script>
|
498 |
-
<script type='text/javascript' src='<?php echo $plugin_url.'/../../../wp-includes/js/jquery/ui/'.$prefix_ui.'core.min.js'; ?>'></script>
|
499 |
-
<script type='text/javascript' src='<?php echo $plugin_url.'/../../../wp-includes/js/jquery/ui/'.$prefix_ui.'datepicker.min.js'; ?>'></script>
|
500 |
-
<script type='text/javascript' src='<?php echo $plugin_url.'/../../../wp-includes/js/jquery/ui/'.$prefix_ui.'widget.min.js'; ?>'></script>
|
501 |
-
<script type='text/javascript' src='<?php echo $plugin_url.'/../../../wp-includes/js/jquery/ui/'.$prefix_ui.'position.min.js'; ?>'></script>
|
502 |
-
<script type='text/javascript' src='<?php echo $plugin_url.'/../../../wp-includes/js/jquery/ui/'.$prefix_ui.'tooltip.min.js'; ?>'></script>
|
503 |
-
<script>
|
504 |
-
var fbuilderjQuery = jQuery.noConflict( );
|
505 |
-
if( typeof jQueryBK != 'undefined' ) jQuery = jQueryBK;
|
506 |
-
</script>
|
507 |
-
<script type='text/javascript' src='<?php echo plugins_url('js/jQuery.stringify.js', __FILE__); ?>'></script>
|
508 |
-
<script type='text/javascript' src='<?php echo plugins_url('js/jquery.validate.js', __FILE__); ?>'></script>
|
509 |
-
<script type='text/javascript'>
|
510 |
-
/* <![CDATA[ */
|
511 |
-
var cp_ppp_fbuilder_config<?php echo $CP_CPP_global_form_count; ?> = {"obj":"{\"pub\":true,\"identifier\":\"<?php echo $CP_CPP_global_form_count; ?>\",\"messages\": {\n \t \t\"required\": \"This field is required.\",\n \t \t\"email\": \"Please enter a valid email address.\",\n \t \t\"datemmddyyyy\": \"Please enter a valid date with this format(mm\/dd\/yyyy)\",\n \t \t\"dateddmmyyyy\": \"Please enter a valid date with this format(dd\/mm\/yyyy)\",\n \t \t\"number\": \"Please enter a valid number.\",\n \t \t\"digits\": \"Please enter only digits.\",\n \t \t\"max\": \"Please enter a value less than or equal to {0}.\",\n \t \t\"min\": \"Please enter a value greater than or equal to {0}.\",\"previous\": \"<?php echo str_replace(array('"'),array('\\"'),$previous_label); ?>\",\"next\": \"<?php echo str_replace(array('"'),array('\\"'),$next_label); ?>\"\n \t }}"};
|
512 |
-
/* ]]> */
|
513 |
-
</script>
|
514 |
-
<script type='text/javascript' src='<?php echo get_site_url( get_current_blog_id() ).'?cp_ppp_resources=public'; ?>'></script>
|
515 |
-
<?php
|
516 |
-
}
|
517 |
-
}
|
518 |
-
|
519 |
-
|
520 |
-
function cp_ppp_settingsLink($links) {
|
521 |
-
$settings_link = '<a href="options-general.php?page=cp_ppp">'.__('Settings').'</a>';
|
522 |
-
array_unshift($links, $settings_link);
|
523 |
-
return $links;
|
524 |
-
}
|
525 |
-
|
526 |
-
|
527 |
-
function cp_ppp_helpLink($links) {
|
528 |
-
$help_link = '<a href="http://wordpress.dwbooster.com/forms/cp-contact-form-with-paypal">'.__('Help').'</a>';
|
529 |
-
array_unshift($links, $help_link);
|
530 |
-
return $links;
|
531 |
-
}
|
532 |
-
|
533 |
-
|
534 |
-
function cp_ppp_customAdjustmentsLink($links) {
|
535 |
-
$customAdjustments_link = '<a href="http://wordpress.dwbooster.com/contact-us">'.__('Request custom changes').'</a>';
|
536 |
-
array_unshift($links, $customAdjustments_link);
|
537 |
-
return $links;
|
538 |
-
}
|
539 |
-
|
540 |
-
|
541 |
-
function set_cp_ppp_insert_button() {
|
542 |
-
print '<a href="javascript:cp_ppp_insertForm();" title="'.__('Insert Payment Form for PayPal Pro').'"><img hspace="5" src="'.plugins_url('/images/cp_form.gif', __FILE__).'" alt="'.__('Insert Payment Form for PayPal Pro').'" /></a>';
|
543 |
-
}
|
544 |
-
|
545 |
-
|
546 |
-
function cp_ppp_html_post_page() {
|
547 |
-
if (isset($_GET["cal"]) && $_GET["cal"] != '')
|
548 |
-
{
|
549 |
-
if (isset($_GET["list"]) && $_GET["list"] == '1')
|
550 |
-
@include_once dirname( __FILE__ ) . '/cp_ppp_admin_int_message_list.inc.php';
|
551 |
-
else if (current_user_can('manage_options'))
|
552 |
-
@include_once dirname( __FILE__ ) . '/cp_ppp_admin_int.php';
|
553 |
-
else
|
554 |
-
echo 'Current user permissions aren\'t enough for accesing this page.';
|
555 |
-
}
|
556 |
-
else
|
557 |
-
{
|
558 |
-
if (isset($_GET["page"]) &&$_GET["page"] == 'cp_ppp_upgrade')
|
559 |
-
{
|
560 |
-
echo("Redirecting to upgrade page...<script type='text/javascript'>document.location='http://wordpress.dwbooster.com/forms/paypal-payment-pro-form#download';</script>");
|
561 |
-
exit;
|
562 |
-
}
|
563 |
-
else if (isset($_GET["page"]) &&$_GET["page"] == 'cp_ppp_demo')
|
564 |
-
{
|
565 |
-
echo("Redirecting to demo page...<script type='text/javascript'>document.location='http://wordpress.dwbooster.com/forms/cp-contact-form-with-paypal#demo';</script>");
|
566 |
-
exit;
|
567 |
-
}
|
568 |
-
else
|
569 |
-
@include_once dirname( __FILE__ ) . '/cp_ppp_admin_int_list.inc.php';
|
570 |
-
}
|
571 |
-
}
|
572 |
-
|
573 |
-
|
574 |
-
function set_cp_ppp_insert_adminScripts($hook) {
|
575 |
-
if (isset($_GET["page"]) && $_GET["page"] == "cp_ppp")
|
576 |
-
{
|
577 |
-
wp_deregister_script('query-stringify');
|
578 |
-
wp_register_script('query-stringify', plugins_url('/js/jQuery.stringify.js', __FILE__));
|
579 |
-
wp_enqueue_script( 'cp_ppp_buikder_script', get_site_url( get_current_blog_id() ).'?cp_ppp_resources=admin',array("jquery","jquery-ui-core","jquery-ui-sortable","jquery-ui-tabs","jquery-ui-droppable","jquery-ui-button","jquery-ui-datepicker","query-stringify") );
|
580 |
-
|
581 |
-
wp_enqueue_style('cp_ppp_buikder_script_f_styles', plugins_url('css/style.css', __FILE__));
|
582 |
-
wp_enqueue_style('cp_ppp_buikder_script_jq_styles', plugins_url('css/cupertino/jquery-ui-1.8.20.custom.css', __FILE__));
|
583 |
-
}
|
584 |
-
|
585 |
-
if( 'post.php' != $hook && 'post-new.php' != $hook )
|
586 |
-
return;
|
587 |
-
wp_enqueue_script( 'cp_ppp_script', plugins_url('/cp_ppp_scripts.js', __FILE__) );
|
588 |
-
}
|
589 |
-
|
590 |
-
|
591 |
-
function cp_ppp_get_site_url($admin = false)
|
592 |
-
{
|
593 |
-
$blog = get_current_blog_id();
|
594 |
-
if( $admin )
|
595 |
-
$url = get_admin_url( $blog );
|
596 |
-
else
|
597 |
-
$url = get_home_url( $blog );
|
598 |
-
|
599 |
-
$url = parse_url($url);
|
600 |
-
$url = rtrim(@$url["path"],"/");
|
601 |
-
return $url;
|
602 |
-
}
|
603 |
-
|
604 |
-
function cp_ppp_get_FULL_site_url($admin = false)
|
605 |
-
{
|
606 |
-
$url = cp_ppp_get_site_url($admin);
|
607 |
-
$pos = strpos($url, "://");
|
608 |
-
if ($pos === false)
|
609 |
-
$url = 'http://'.$_SERVER["HTTP_HOST"].$url;
|
610 |
-
// if (!empty($_SERVER['HTTPS']))
|
611 |
-
// $url = str_replace("http://","https://",$url);
|
612 |
-
return $url;
|
613 |
-
}
|
614 |
-
|
615 |
-
function cp_ppp_cleanJSON($str)
|
616 |
-
{
|
617 |
-
$str = str_replace('&qquot;','"',$str);
|
618 |
-
$str = str_replace(' ',' ',$str);
|
619 |
-
$str = str_replace("\n",'\n',$str);
|
620 |
-
$str = str_replace("\r",'',$str);
|
621 |
-
return $str;
|
622 |
-
}
|
623 |
-
|
624 |
-
|
625 |
-
function cp_ppp_load_discount_codes() {
|
626 |
-
global $wpdb;
|
627 |
-
|
628 |
-
if ( ! current_user_can('edit_pages') ) // prevent loading coupons from outside admin area
|
629 |
-
{
|
630 |
-
echo 'No enough privilegies to load this content.';
|
631 |
-
exit;
|
632 |
-
}
|
633 |
-
|
634 |
-
if (!defined('CP_PPP_ID'))
|
635 |
-
define ('CP_PPP_ID',intval($_GET["dex_item"]));
|
636 |
-
|
637 |
-
cp_ppp_add_field_verify($wpdb->prefix.CP_PPP_DISCOUNT_CODES_TABLE_NAME_NO_PREFIX ,"dc_times", "varchar(10) DEFAULT '0' NOT NULL");
|
638 |
-
|
639 |
-
if (isset($_GET["add"]) && $_GET["add"] == "1")
|
640 |
-
$wpdb->insert( CP_PPP_DISCOUNT_CODES_TABLE_NAME, array('form_id' => CP_PPP_ID,
|
641 |
-
'code' => esc_sql($_GET["code"]),
|
642 |
-
'discount' => $_GET["discount"],
|
643 |
-
'availability' => $_GET["discounttype"],
|
644 |
-
'dc_times' => $_GET["tm"],
|
645 |
-
'expires' => esc_sql($_GET["expires"]),
|
646 |
-
));
|
647 |
-
|
648 |
-
if (isset($_GET["delete"]) && $_GET["delete"] == "1")
|
649 |
-
$wpdb->query( $wpdb->prepare( "DELETE FROM ".CP_PPP_DISCOUNT_CODES_TABLE_NAME." WHERE id = %d", $_GET["code"] ));
|
650 |
-
|
651 |
-
$codes = $wpdb->get_results( $wpdb->prepare('SELECT * FROM '.CP_PPP_DISCOUNT_CODES_TABLE_NAME.' WHERE `form_id`=%d', CP_PPP_ID) );
|
652 |
-
if (count ($codes))
|
653 |
-
{
|
654 |
-
echo '<table>';
|
655 |
-
echo '<tr>';
|
656 |
-
echo ' <th style="padding:2px;background-color: #cccccc;font-weight:bold;">Cupon Code</th>';
|
657 |
-
echo ' <th style="padding:2px;background-color: #cccccc;font-weight:bold;">Discount</th>';
|
658 |
-
echo ' <th style="padding:2px;background-color: #cccccc;font-weight:bold;">Type</th>';
|
659 |
-
echo ' <th style="padding:2px;background-color: #cccccc;font-weight:bold;" nowrap>Can be used?</th>';
|
660 |
-
echo ' <th style="padding:2px;background-color: #cccccc;font-weight:bold;" nowrap>Used so far</th>';
|
661 |
-
echo ' <th style="padding:2px;background-color: #cccccc;font-weight:bold;">Valid until</th>';
|
662 |
-
echo ' <th style="padding:2px;background-color: #cccccc;font-weight:bold;">Options</th>';
|
663 |
-
echo '</tr>';
|
664 |
-
foreach ($codes as $value)
|
665 |
-
{
|
666 |
-
echo '<tr>';
|
667 |
-
echo '<td>'.$value->code.'</td>';
|
668 |
-
echo '<td>'.$value->discount.'</td>';
|
669 |
-
echo '<td>'.($value->availability==1?"Fixed Value":"Percent").'</td>';
|
670 |
-
echo '<td nowrap>'.($value->dc_times=='0'?'Unlimited':$value->dc_times.' times').'</td>';
|
671 |
-
echo '<td nowrap>'.$value->used.' times</td>';
|
672 |
-
echo '<td>'.substr($value->expires,0,10).'</td>';
|
673 |
-
echo '<td>[<a href="javascript:dex_delete_coupon('.$value->id.')">Delete</a>]</td>';
|
674 |
-
echo '</tr>';
|
675 |
-
}
|
676 |
-
echo '</table>';
|
677 |
-
}
|
678 |
-
else
|
679 |
-
echo 'No discount codes listed for this form yet.';
|
680 |
-
exit;
|
681 |
-
}
|
682 |
-
|
683 |
-
|
684 |
-
function cp_ppp_check_posted_data() {
|
685 |
-
|
686 |
-
global $wpdb;
|
687 |
-
|
688 |
-
|
689 |
-
if( isset( $_REQUEST[ 'cp_ppp_resources' ] ) )
|
690 |
-
{
|
691 |
-
if( $_REQUEST[ 'cp_ppp_resources' ] == 'admin' )
|
692 |
-
{
|
693 |
-
require_once dirname( __FILE__ ).'/js/fbuilder-loader-admin.php';
|
694 |
-
}
|
695 |
-
else
|
696 |
-
{
|
697 |
-
require_once dirname( __FILE__ ).'/js/fbuilder-loader-public.php';
|
698 |
-
}
|
699 |
-
exit;
|
700 |
-
}
|
701 |
-
|
702 |
-
if (isset( $_GET['cp_ppp_encodingfix'] ) && $_GET['cp_ppp_encodingfix'] == '1')
|
703 |
-
{
|
704 |
-
$wpdb->query( $wpdb->prepare('alter table '.CP_PPP_DISCOUNT_CODES_TABLE_NAME.' convert to character set utf8 collate utf8_unicode_ci;', array()) );
|
705 |
-
$wpdb->query( $wpdb->prepare('alter table '.CP_PPP_FORMS_TABLE.' convert to character set utf8 collate utf8_unicode_ci;', array()) );
|
706 |
-
$wpdb->query( $wpdb->prepare('alter table '.CP_PPP_POSTS_TABLE_NAME.' convert to character set utf8 collate utf8_unicode_ci;', array()) );
|
707 |
-
echo 'Ok, encoding fixed.';
|
708 |
-
exit;
|
709 |
-
}
|
710 |
-
|
711 |
-
if(isset($_GET) && array_key_exists('cp_ppp_post',$_GET)) {
|
712 |
-
if ($_GET["cp_ppp_post"] == 'loadcoupons')
|
713 |
-
cp_ppp_load_discount_codes();
|
714 |
-
}
|
715 |
-
|
716 |
-
if (isset( $_GET['cp_ppp'] ) && $_GET['cp_ppp'] == 'captcha' )
|
717 |
-
{
|
718 |
-
@include_once dirname( __FILE__ ) . '/captcha/captcha.php';
|
719 |
-
exit;
|
720 |
-
}
|
721 |
-
|
722 |
-
if (isset( $_GET['cp_ppp_csv'] ) && is_admin() )
|
723 |
-
{
|
724 |
-
cp_ppp_export_csv();
|
725 |
-
return;
|
726 |
-
}
|
727 |
-
|
728 |
-
if (isset( $_GET['script_load_method'] ) )
|
729 |
-
{
|
730 |
-
cp_ppp_update_script_method();
|
731 |
-
return;
|
732 |
-
}
|
733 |
-
|
734 |
-
if ( 'POST' == $_SERVER['REQUEST_METHOD'] && isset( $_POST['cp_ppp_post_options'] ) && is_admin() )
|
735 |
-
{
|
736 |
-
cp_ppp_save_options();
|
737 |
-
return;
|
738 |
-
}
|
739 |
-
|
740 |
-
if ( 'POST' != $_SERVER['REQUEST_METHOD'] || ! isset( $_POST['cp_ppp_pform_process'] ) )
|
741 |
-
if ( 'GET' != $_SERVER['REQUEST_METHOD'] || !isset( $_GET['hdcaptcha_cp_ppp_post'] ) )
|
742 |
-
return;
|
743 |
-
|
744 |
-
if (isset($_GET["cp_ppp_id"])) $_POST["cp_ppp_id"] = intval($_GET["cp_ppp_id"]);
|
745 |
-
if (isset($_POST["cp_ppp_id"])) define("CP_PPP_ID",intval($_POST["cp_ppp_id"]));
|
746 |
-
|
747 |
-
if (function_exists('session_start')) @session_start();
|
748 |
-
if (isset($_GET["ps"])) $sequence = $_GET["ps"]; else if (isset($_POST["cp_pform_psequence"])) $sequence = $_POST["cp_pform_psequence"];
|
749 |
-
if (!isset($_GET['hdcaptcha_cp_ppp_post']) || $_GET['hdcaptcha_cp_ppp_post'] == '') $_GET['hdcaptcha_cp_ppp_post'] = @$_POST['hdcaptcha_cp_ppp_post'];
|
750 |
-
if (
|
751 |
-
(cp_ppp_get_option('cv_enable_captcha', CP_PPP_DEFAULT_cv_enable_captcha) != 'false') &&
|
752 |
-
( (strtolower($_GET['hdcaptcha_cp_ppp_post']) != strtolower(@$_SESSION['rand_code'.$sequence])) ||
|
753 |
-
($_SESSION['rand_code'.$sequence] == '')
|
754 |
-
)
|
755 |
-
&&
|
756 |
-
( (md5(strtolower($_GET['hdcaptcha_cp_ppp_post'])) != $_COOKIE['rand_code'.$sequence]) ||
|
757 |
-
($_COOKIE['rand_code'.$sequence] == '')
|
758 |
-
)
|
759 |
-
)
|
760 |
-
{
|
761 |
-
echo 'captchafailed';
|
762 |
-
exit;
|
763 |
-
}
|
764 |
-
|
765 |
-
// if this isn't the real post (it was the captcha verification) then echo ok and exit
|
766 |
-
if ( 'POST' != $_SERVER['REQUEST_METHOD'] || ! isset( $_POST['cp_ppp_pform_process'] ) )
|
767 |
-
{
|
768 |
-
echo 'ok';
|
769 |
-
exit;
|
770 |
-
}
|
771 |
-
|
772 |
-
|
773 |
-
// get base price
|
774 |
-
$price = cp_ppp_get_option('request_cost', CP_PPP_DEFAULT_COST);
|
775 |
-
$price = trim(str_replace(',','', str_replace(CP_PPP_DEFAULT_CURRENCY_SYMBOL,'',
|
776 |
-
str_replace(CP_PPP_GBP_CURRENCY_SYMBOL,'',
|
777 |
-
str_replace(CP_PPP_EUR_CURRENCY_SYMBOL_A, '',
|
778 |
-
str_replace(CP_PPP_EUR_CURRENCY_SYMBOL_B,'', $price )))) ));
|
779 |
-
$added_cost = @$_POST[cp_ppp_get_option('paypal_price_field', '').$sequence];
|
780 |
-
$added_cost = str_replace('$','',$added_cost);
|
781 |
-
$added_cost = str_replace('USD','',$added_cost);
|
782 |
-
$added_cost = str_replace('EUR','',$added_cost);
|
783 |
-
$added_cost = str_replace('GBP','',$added_cost);
|
784 |
-
$added_cost = trim($added_cost);
|
785 |
-
if (!is_numeric($added_cost))
|
786 |
-
$added_cost = 0;
|
787 |
-
$price += $added_cost;
|
788 |
-
$taxes = trim(str_replace("%","",cp_ppp_get_option('request_taxes', '0')));
|
789 |
-
|
790 |
-
// get form info
|
791 |
-
//---------------------------
|
792 |
-
$identify_prices = cp_ppp_get_option('paypal_identify_prices',CP_PPP_DEFAULT_PAYPAL_IDENTIFY_PRICES);
|
793 |
-
$paypal_zero_payment = cp_ppp_get_option('paypal_zero_payment',CP_PPP_DEFAULT_PAYPAL_ZERO_PAYMENT);
|
794 |
-
require_once(ABSPATH . "wp-admin" . '/includes/file.php');
|
795 |
-
$form_data = json_decode(cp_ppp_cleanJSON(cp_ppp_get_option('form_structure', CP_PPP_DEFAULT_form_structure)));
|
796 |
-
$fields = array();
|
797 |
-
foreach ($form_data[0] as $item)
|
798 |
-
{
|
799 |
-
$fields[$item->name] = $item->title;
|
800 |
-
if ($item->predefined == $_POST[$item->name.$sequence] && $item->predefinedClick == '1')
|
801 |
-
$_POST[$item->name.$sequence] = '';
|
802 |
-
if ($item->ftype == 'fPhone') // join fields for phone fields
|
803 |
-
{
|
804 |
-
if (isset($_POST[$item->name.$sequence."_0"]))
|
805 |
-
{
|
806 |
-
$_POST[$item->name.$sequence] = '';
|
807 |
-
for($i=0; $i<=substr_count($item->dformat," "); $i++)
|
808 |
-
{
|
809 |
-
$_POST[$item->name.$sequence] .= ($_POST[$item->name.$sequence."_".$i]!=''?($i==0?'':'-').$_POST[$item->name.$sequence."_".$i]:'');
|
810 |
-
unset($_POST[$item->name.$sequence."_".$i]);
|
811 |
-
}
|
812 |
-
}
|
813 |
-
}
|
814 |
-
else if (isset($_POST[$item->name.$sequence]) && $identify_prices && ($item->ftype == 'fcheck' || $item->ftype == 'fradio' || $item->ftype == 'fdropdown'))
|
815 |
-
{
|
816 |
-
$values = ( is_array($_POST[$item->name.$sequence]) ? $_POST[$item->name.$sequence] : array($_POST[$item->name.$sequence]) );
|
817 |
-
|
818 |
-
foreach ($values as $value)
|
819 |
-
{
|
820 |
-
$matches_eur_a = array();
|
821 |
-
preg_match_all ('/([0-9,]+(\.[0-9]{2})?)/', $value, $matches_eur_a);
|
822 |
-
$matches = $matches_eur_a[0];
|
823 |
-
|
824 |
-
foreach ($matches as $item)
|
825 |
-
{
|
826 |
-
$item = trim(str_replace(',','', str_replace(CP_PPP_DEFAULT_CURRENCY_SYMBOL,'',
|
827 |
-
str_replace(CP_PPP_GBP_CURRENCY_SYMBOL,'',
|
828 |
-
str_replace(CP_PPP_EUR_CURRENCY_SYMBOL_A, '',
|
829 |
-
str_replace(CP_PPP_EUR_CURRENCY_SYMBOL_B,'', $item )))) ));
|
830 |
-
if (is_numeric($item)) {
|
831 |
-
$nindex = strpos($value, " ".$item);
|
832 |
-
$nindex2 = substr($value,0,strlen($item));
|
833 |
-
if ($nindex === false && $nindex2 != $item) // exclude items with a black space before it
|
834 |
-
$price += $item;
|
835 |
-
}
|
836 |
-
}
|
837 |
-
}
|
838 |
-
}
|
839 |
-
}
|
840 |
-
|
841 |
-
// calculate discounts if any
|
842 |
-
//---------------------------
|
843 |
-
$discount_note = "";
|
844 |
-
$coupon = false;
|
845 |
-
$codes = $wpdb->get_results( $wpdb->prepare(
|
846 |
-
"SELECT * FROM ".CP_PPP_DISCOUNT_CODES_TABLE_NAME." WHERE ((dc_times>used) OR dc_times='0') AND code=%s AND expires>=%s AND `form_id`=%d",
|
847 |
-
@$_POST["couponcode"], date("Y-m-d")." 00:00:00", CP_PPP_ID
|
848 |
-
)
|
849 |
-
);
|
850 |
-
if (count($codes))
|
851 |
-
{
|
852 |
-
$coupon = $codes[0];
|
853 |
-
if ($coupon->availability==1)
|
854 |
-
{
|
855 |
-
$price = number_format (floatval ($price) - $coupon->discount,2);
|
856 |
-
$discount_note = " (".cp_ppp_get_option('currency', CP_PPP_DEFAULT_CURRENCY)." ".$coupon->discount." discount applied)";
|
857 |
-
}
|
858 |
-
else
|
859 |
-
{
|
860 |
-
$price = number_format (floatval ($price) - $price*$coupon->discount/100,2);
|
861 |
-
$discount_note = " (".$coupon->discount."% discount applied)";
|
862 |
-
}
|
863 |
-
}
|
864 |
-
|
865 |
-
if ( cp_ppp_get_option('enable_paypal',CP_PPP_DEFAULT_ENABLE_PAYPAL) == "3" && ($_POST['cp_ppp_paymentspro'.$sequence] == "1") )
|
866 |
-
{
|
867 |
-
cp_ppp_payments_pro($price);
|
868 |
-
exit;
|
869 |
-
}
|
870 |
-
|
871 |
-
// grab posted data
|
872 |
-
//---------------------------
|
873 |
-
$buffer = "";
|
874 |
-
foreach ($_POST as $item => $value)
|
875 |
-
if (isset($fields[str_replace($sequence,'',$item)]))
|
876 |
-
{
|
877 |
-
$buffer .= $fields[str_replace($sequence,'',$item)] . ": ". (is_array($value)?(implode(", ",$value)):($value)) . "\n\n";
|
878 |
-
$params[str_replace($sequence,'',$item)] = $value;
|
879 |
-
}
|
880 |
-
|
881 |
-
$buffer_A = $buffer;
|
882 |
-
|
883 |
-
$paypal_product_name = cp_ppp_get_option('paypal_product_name', CP_PPP_DEFAULT_PRODUCT_NAME).$discount_note;
|
884 |
-
$params["PayPal Product Name"] = $paypal_product_name;
|
885 |
-
$params["Cost"] = $price;
|
886 |
-
$params["Costtax"] = $price + round($price * ($taxes/100),2);
|
887 |
-
$params["coupon"] = ($coupon?$coupon->code:"");
|
888 |
-
|
889 |
-
$current_user = wp_get_current_user();
|
890 |
-
$params["user_login"] = $current_user->user_login;
|
891 |
-
$params["user_id"] = $current_user->ID;
|
892 |
-
$params["user_email"] = $current_user->user_email;
|
893 |
-
$params["user_firstname"] = $current_user->user_firstname;
|
894 |
-
$params["user_lastname"] = $current_user->user_lastname;
|
895 |
-
$params["display_name"] = $current_user->display_name;
|
896 |
-
|
897 |
-
if (isset($_POST["bccf_payment_option_paypal"]) && $_POST["bccf_payment_option_paypal"] == '0')
|
898 |
-
$params["payment_type"] = 'Other';
|
899 |
-
else
|
900 |
-
$params["payment_type"] = 'PayPal';
|
901 |
-
|
902 |
-
cp_ppp_add_field_verify(CP_PPP_POSTS_TABLE_NAME,'posted_data');
|
903 |
-
|
904 |
-
// insert into database
|
905 |
-
//---------------------------
|
906 |
-
$to = cp_ppp_get_option('cu_user_email_field', CP_PPP_DEFAULT_cu_user_email_field).$sequence;
|
907 |
-
$rows_affected = $wpdb->insert( CP_PPP_POSTS_TABLE_NAME, array( 'formid' => CP_PPP_ID,
|
908 |
-
'time' => current_time('mysql'),
|
909 |
-
'ipaddr' => $_SERVER['REMOTE_ADDR'],
|
910 |
-
'notifyto' => (@$_POST[$to]?$_POST[$to]:''),
|
911 |
-
'paypal_post' => serialize($params),
|
912 |
-
'posted_data' => serialize($params),
|
913 |
-
'data' =>$buffer_A .($coupon?"\n\nCoupon code:".$coupon->code.$discount_note:"")
|
914 |
-
) );
|
915 |
-
if (!$rows_affected)
|
916 |
-
{
|
917 |
-
echo 'Error saving data! Please try again.';
|
918 |
-
echo '<br /><br />Error debug information: '.mysql_error();
|
919 |
-
exit;
|
920 |
-
}
|
921 |
-
|
922 |
-
$myrows = $wpdb->get_results( "SELECT MAX(id) as max_id FROM ".CP_PPP_POSTS_TABLE_NAME );
|
923 |
-
|
924 |
-
|
925 |
-
// save data here
|
926 |
-
$item_number = $myrows[0]->max_id;
|
927 |
-
|
928 |
-
$paypal_optional = (cp_ppp_get_option('enable_paypal',CP_PPP_DEFAULT_ENABLE_PAYPAL) == '2');
|
929 |
-
$paypal_recurrent = cp_ppp_get_option('paypal_recurrent_setup','0');
|
930 |
-
|
931 |
-
//if (cp_ppp_get_option('enable_paypal',CP_PPP_DEFAULT_ENABLE_PAYPAL) == "3")
|
932 |
-
$wpdb->query( $wpdb->prepare(
|
933 |
-
"UPDATE ".CP_PPP_POSTS_TABLE_NAME." SET paid=1,paypal_post='' WHERE id=%d",
|
934 |
-
$item_number
|
935 |
-
)
|
936 |
-
);
|
937 |
-
|
938 |
-
cp_ppp_process_ready_to_go_reservation($item_number, "", $params);
|
939 |
-
header("Location: ".cp_ppp_get_option('fp_return_page', CP_PPP_DEFAULT_fp_return_page));
|
940 |
-
exit;
|
941 |
-
|
942 |
-
}
|
943 |
-
|
944 |
-
function cp_ppp_add_field_verify ($table, $field, $type = "text")
|
945 |
-
{
|
946 |
-
global $wpdb;
|
947 |
-
$results = $wpdb->get_results( $wpdb->prepare(
|
948 |
-
"SHOW columns FROM `".$table."` where field=%s",
|
949 |
-
$field
|
950 |
-
)
|
951 |
-
);
|
952 |
-
if (!count($results))
|
953 |
-
{
|
954 |
-
$sql = "ALTER TABLE `".$table."` ADD `".$field."` ".$type;
|
955 |
-
$wpdb->query($sql);
|
956 |
-
}
|
957 |
-
}
|
958 |
-
|
959 |
-
function cp_ppp_check_upload($uploadfiles) {
|
960 |
-
$filetmp = $uploadfiles['tmp_name'];
|
961 |
-
//clean filename and extract extension
|
962 |
-
$filename = $uploadfiles['name'];
|
963 |
-
// get file info
|
964 |
-
$filetype = wp_check_filetype( basename( $filename ), null );
|
965 |
-
|
966 |
-
if ( in_array ($filetype["ext"],array("php","asp","aspx","cgi","pl","perl","exe")) )
|
967 |
-
return false;
|
968 |
-
else
|
969 |
-
return true;
|
970 |
-
}
|
971 |
-
|
972 |
-
function cp_ppp_payments_pro_POST($methodName_, $nvpStr_) {
|
973 |
-
global $wpdb;
|
974 |
-
|
975 |
-
|
976 |
-
// Set up your API credentials, PayPal end point, and API version.
|
977 |
-
$API_UserName = urlencode(cp_ppp_get_option('paypalpro_api_username',''));
|
978 |
-
$API_Password = urlencode(cp_ppp_get_option('paypalpro_api_password',''));
|
979 |
-
$API_Signature = urlencode(cp_ppp_get_option('paypalpro_api_signature',''));
|
980 |
-
if (cp_ppp_get_option('paypal_mode',CP_PPP_DEFAULT_PAYPAL_MODE) == "sandbox")
|
981 |
-
$API_Endpoint = "https://api-3t.sandbox.paypal.com/nvp";
|
982 |
-
else
|
983 |
-
$API_Endpoint = "https://api-3t.paypal.com/nvp";
|
984 |
-
$version = urlencode('51.0');
|
985 |
-
|
986 |
-
// Set the curl parameters.
|
987 |
-
$ch = curl_init();
|
988 |
-
curl_setopt($ch, CURLOPT_URL, $API_Endpoint);
|
989 |
-
curl_setopt($ch, CURLOPT_VERBOSE, 1);
|
990 |
-
|
991 |
-
// Turn off the server and peer verification (TrustManager Concept).
|
992 |
-
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
|
993 |
-
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);
|
994 |
-
|
995 |
-
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
996 |
-
curl_setopt($ch, CURLOPT_POST, 1);
|
997 |
-
|
998 |
-
// Set the API operation, version, and API signature in the request.
|
999 |
-
$nvpreq = "METHOD=$methodName_&VERSION=$version&PWD=$API_Password&USER=$API_UserName&SIGNATURE=$API_Signature$nvpStr_";
|
1000 |
-
|
1001 |
-
// Set the request as a POST FIELD for curl.
|
1002 |
-
curl_setopt($ch, CURLOPT_POSTFIELDS, $nvpreq);
|
1003 |
-
|
1004 |
-
// Get response from the server.
|
1005 |
-
$httpResponse = curl_exec($ch);
|
1006 |
-
|
1007 |
-
if(!$httpResponse) {
|
1008 |
-
exit("$methodName_ failed: ".curl_error($ch).'('.curl_errno($ch).')');
|
1009 |
-
}
|
1010 |
-
|
1011 |
-
// Extract the response details.
|
1012 |
-
$httpResponseAr = explode("&", $httpResponse);
|
1013 |
-
|
1014 |
-
$httpParsedResponseAr = array();
|
1015 |
-
foreach ($httpResponseAr as $i => $value) {
|
1016 |
-
$tmpAr = explode("=", $value);
|
1017 |
-
if(sizeof($tmpAr) > 1) {
|
1018 |
-
$httpParsedResponseAr[$tmpAr[0]] = $tmpAr[1];
|
1019 |
-
}
|
1020 |
-
}
|
1021 |
-
|
1022 |
-
if((0 == sizeof($httpParsedResponseAr)) || !array_key_exists('ACK', $httpParsedResponseAr)) {
|
1023 |
-
exit("Invalid HTTP Response for POST request($nvpreq) to $API_Endpoint.");
|
1024 |
-
}
|
1025 |
-
|
1026 |
-
return $httpParsedResponseAr;
|
1027 |
-
}
|
1028 |
-
|
1029 |
-
function cp_ppp_payments_pro($price) {
|
1030 |
-
global $wpdb;
|
1031 |
-
|
1032 |
-
// Set request-specific fields.
|
1033 |
-
$paymentType = urlencode('Sale'); // or 'Authorization'
|
1034 |
-
|
1035 |
-
$firstName = urlencode($_POST['cfpp_customer_first_name']);
|
1036 |
-
$lastName = urlencode($_POST['cfpp_customer_last_name']);
|
1037 |
-
$creditCardType = urlencode($_POST['cfpp_customer_credit_card_type']);
|
1038 |
-
$creditCardNumber = urlencode($_POST['cfpp_customer_credit_card_number']);
|
1039 |
-
$expDateMonth = $_POST['cfpp_cc_expiration_month'];
|
1040 |
-
// Month must be padded with leading zero
|
1041 |
-
$padDateMonth = urlencode(str_pad($expDateMonth, 2, '0', STR_PAD_LEFT));
|
1042 |
-
|
1043 |
-
$expDateYear = urlencode($_POST['cfpp_cc_expiration_year']);
|
1044 |
-
$cvv2Number = urlencode($_POST['cfpp_cc_cvv2_number']);
|
1045 |
-
$address1 = urlencode($_POST['cfpp_customer_address1']);
|
1046 |
-
$address2 = urlencode($_POST['cfpp_customer_address2']);
|
1047 |
-
$city = urlencode($_POST['cfpp_customer_city']);
|
1048 |
-
$state = urlencode($_POST['cfpp_customer_state']);
|
1049 |
-
$zip = urlencode($_POST['cfpp_customer_zip']);
|
1050 |
-
$country = urlencode($_POST['cfpp_customer_country']); // US or other valid country code
|
1051 |
-
|
1052 |
-
$amount = urlencode($price);
|
1053 |
-
$currencyID = urlencode(strtoupper(cp_ppp_get_option('currency', CP_PPP_DEFAULT_CURRENCY)));
|
1054 |
-
|
1055 |
-
// Add request-specific fields to the request string.
|
1056 |
-
$nvpStr = "&PAYMENTACTION=$paymentType&AMT=$amount&CREDITCARDTYPE=$creditCardType&ACCT=$creditCardNumber".
|
1057 |
-
"&EXPDATE=$padDateMonth$expDateYear&CVV2=$cvv2Number&FIRSTNAME=$firstName&LASTNAME=$lastName".
|
1058 |
-
"&STREET=$address1&CITY=$city&STATE=$state&ZIP=$zip&COUNTRYCODE=$country&CURRENCYCODE=$currencyID&BUTTONSOURCE=NetFactorSL_SI_Custom";
|
1059 |
-
|
1060 |
-
// Execute the API operation; see the PPHttpPost function above.
|
1061 |
-
$httpParsedResponseAr = cp_ppp_payments_pro_POST('DoDirectPayment', $nvpStr);
|
1062 |
-
foreach ($httpParsedResponseAr as $item => $value)
|
1063 |
-
$httpParsedResponseAr[$item] = urldecode($value);
|
1064 |
-
if("SUCCESS" == strtoupper($httpParsedResponseAr["ACK"]) || "SUCCESSWITHWARNING" == strtoupper($httpParsedResponseAr["ACK"])) {
|
1065 |
-
exit('OK');
|
1066 |
-
} else {
|
1067 |
-
exit("Payment failed: ".$httpParsedResponseAr["L_LONGMESSAGE0"]."\n\nError Code: " . $httpParsedResponseAr["L_ERRORCODE0"]." (". $httpParsedResponseAr["L_SHORTMESSAGE0"].")");
|
1068 |
-
}
|
1069 |
-
|
1070 |
-
}
|
1071 |
-
|
1072 |
-
|
1073 |
-
function cp_ppp_process_ready_to_go_reservation($itemnumber, $payer_email = "", $params = array())
|
1074 |
-
{
|
1075 |
-
|
1076 |
-
global $wpdb;
|
1077 |
-
|
1078 |
-
if (!defined('CP_PPP_DEFAULT_fp_from_email')) define('CP_PPP_DEFAULT_fp_from_email', get_the_author_meta('user_email', get_current_user_id()) );
|
1079 |
-
if (!defined('CP_PPP_DEFAULT_fp_destination_emails')) define('CP_PPP_DEFAULT_fp_destination_emails', CP_PPP_DEFAULT_fp_from_email);
|
1080 |
-
|
1081 |
-
$myrows = $wpdb->get_results( $wpdb->prepare(
|
1082 |
-
"SELECT * FROM ".CP_PPP_POSTS_TABLE_NAME." WHERE id=%d",
|
1083 |
-
$itemnumber
|
1084 |
-
)
|
1085 |
-
);
|
1086 |
-
|
1087 |
-
$mycalendarrows = $wpdb->get_results( $wpdb->prepare(
|
1088 |
-
'SELECT * FROM '. $wpdb->prefix.CP_PPP_FORMS_TABLE .' WHERE `id`=%d',
|
1089 |
-
$myrows[0]->formid
|
1090 |
-
)
|
1091 |
-
);
|
1092 |
-
|
1093 |
-
if (!defined('CP_PPP_ID'))
|
1094 |
-
define ('CP_PPP_ID',$myrows[0]->formid);
|
1095 |
-
|
1096 |
-
$buffer_A = $myrows[0]->data;
|
1097 |
-
$buffer = $buffer_A;
|
1098 |
-
|
1099 |
-
if ($params["coupon"] != '')
|
1100 |
-
$wpdb->query( $wpdb->prepare(
|
1101 |
-
"UPDATE ".CP_PPP_DISCOUNT_CODES_TABLE_NAME." SET used=used+1 WHERE code=%s AND expires>=%s AND `form_id`=%d",
|
1102 |
-
@$params["coupon"], date("Y-m-d")." 00:00:00", $myrows[0]->formid
|
1103 |
-
)
|
1104 |
-
);
|
1105 |
-
|
1106 |
-
if ('true' == cp_ppp_get_option('fp_inc_additional_info', CP_PPP_DEFAULT_fp_inc_additional_info))
|
1107 |
-
{
|
1108 |
-
$buffer .="ADDITIONAL INFORMATION\n"
|
1109 |
-
."*********************************\n"
|
1110 |
-
."IP: ".$myrows[0]->ipaddr."\n"
|
1111 |
-
."Server Time: ".date("Y-m-d H:i:s")."\n";
|
1112 |
-
}
|
1113 |
-
|
1114 |
-
// 1- Send email
|
1115 |
-
//---------------------------
|
1116 |
-
|
1117 |
-
/**
|
1118 |
-
$username = "user".$itemnumber;
|
1119 |
-
$password = wp_generate_password( $length=12, $include_standard_special_chars=false );
|
1120 |
-
$email = trim($myrows[0]->notifyto);
|
1121 |
-
wp_create_user( $username, $password, $email );
|
1122 |
-
*/
|
1123 |
-
$attachments = array();
|
1124 |
-
if ('html' == cp_ppp_get_option('fp_emailformat', CP_PPP_DEFAULT_email_format))
|
1125 |
-
$message = str_replace('<'.'%INFO%'.'>',str_replace("\n","<br />",str_replace('<','<',$buffer)),cp_ppp_get_option('fp_message', CP_PPP_DEFAULT_fp_message));
|
1126 |
-
else
|
1127 |
-
$message = str_replace('<'.'%INFO%'.'>',$buffer,cp_ppp_get_option('fp_message', CP_PPP_DEFAULT_fp_message));
|
1128 |
-
foreach ($params as $item => $value)
|
1129 |
-
{
|
1130 |
-
$message = str_replace('<'.'%'.$item.'%'.'>',(is_array($value)?(implode(", ",$value)):($value)),$message);
|
1131 |
-
if (strpos($item,"_link"))
|
1132 |
-
{
|
1133 |
-
foreach ($value as $filevalue)
|
1134 |
-
$attachments[] = $filevalue;
|
1135 |
-
}
|
1136 |
-
}
|
1137 |
-
for ($i=0;$i<500;$i++)
|
1138 |
-
$message = str_replace('<'.'%fieldname'.$i.'%'.'>',"",$message);
|
1139 |
-
$message = str_replace('<'.'%itemnumber%'.'>',$itemnumber,$message);
|
1140 |
-
|
1141 |
-
$message = str_replace('<'.'%username%'.'>',$username,$message);
|
1142 |
-
$message = str_replace('<'.'%password%'.'>',$password,$message);
|
1143 |
-
|
1144 |
-
$subject = cp_ppp_get_option('fp_subject', CP_PPP_DEFAULT_fp_subject);
|
1145 |
-
$from = cp_ppp_get_option('fp_from_email', CP_PPP_DEFAULT_fp_from_email);
|
1146 |
-
$to = explode(",",cp_ppp_get_option('fp_destination_emails', CP_PPP_DEFAULT_fp_destination_emails));
|
1147 |
-
if ('html' == cp_ppp_get_option('fp_emailformat', CP_PPP_DEFAULT_email_format)) $content_type = "Content-Type: text/html; charset=utf-8\n"; else $content_type = "Content-Type: text/plain; charset=utf-8\n";
|
1148 |
-
$replyto = $myrows[0]->notifyto;
|
1149 |
-
|
1150 |
-
foreach ($to as $item)
|
1151 |
-
if (trim($item) != '')
|
1152 |
-
{
|
1153 |
-
wp_mail(trim($item), $subject, $message,
|
1154 |
-
"From: \"$from\" <".$from.">\r\n".
|
1155 |
-
($replyto!=''?"Reply-To: \"$replyto\" <".$replyto.">\r\n":'').
|
1156 |
-
$content_type.
|
1157 |
-
"X-Mailer: PHP/" . phpversion(), $attachments);
|
1158 |
-
}
|
1159 |
-
|
1160 |
-
// 2- Send copy to user
|
1161 |
-
//---------------------------
|
1162 |
-
|
1163 |
-
|
1164 |
-
|
1165 |
-
$to = cp_ppp_get_option('cu_user_email_field', CP_PPP_DEFAULT_cu_user_email_field);
|
1166 |
-
$_POST[$to] = $myrows[0]->notifyto;
|
1167 |
-
if ((trim($_POST[$to]) != '' || $payer_email != '') && 'true' == cp_ppp_get_option('cu_enable_copy_to_user', CP_PPP_DEFAULT_cu_enable_copy_to_user))
|
1168 |
-
{
|
1169 |
-
|
1170 |
-
if ('html' == cp_ppp_get_option('cu_emailformat', CP_PPP_DEFAULT_email_format))
|
1171 |
-
$message = str_replace('<'.'%INFO%'.'>',str_replace("\n","<br />",str_replace('<','<',$buffer_A)).'</pre>',cp_ppp_get_option('cu_message', CP_PPP_DEFAULT_cu_message));
|
1172 |
-
else
|
1173 |
-
$message = str_replace('<'.'%INFO%'.'>',$buffer_A,cp_ppp_get_option('cu_message', CP_PPP_DEFAULT_cu_message));
|
1174 |
-
foreach ($params as $item => $value)
|
1175 |
-
$message = str_replace('<'.'%'.$item.'%'.'>',(is_array($value)?(implode(", ",$value)):($value)),$message);
|
1176 |
-
for ($i=0;$i<500;$i++)
|
1177 |
-
$message = str_replace('<'.'%fieldname'.$i.'%'.'>',"",$message);
|
1178 |
-
|
1179 |
-
$message = str_replace('<'.'%itemnumber%'.'>',$itemnumber,$message);
|
1180 |
-
|
1181 |
-
$message = str_replace('<'.'%username%'.'>',$username,$message);
|
1182 |
-
$message = str_replace('<'.'%password%'.'>',$password,$message);
|
1183 |
-
|
1184 |
-
|
1185 |
-
$subject = cp_ppp_get_option('cu_subject', CP_PPP_DEFAULT_cu_subject);
|
1186 |
-
if ('html' == cp_ppp_get_option('cu_emailformat', CP_PPP_DEFAULT_email_format)) $content_type = "Content-Type: text/html; charset=utf-8\n"; else $content_type = "Content-Type: text/plain; charset=utf-8\n";
|
1187 |
-
if ($_POST[$to] != '')
|
1188 |
-
wp_mail(trim($_POST[$to]), $subject, $message,
|
1189 |
-
"From: \"$from\" <".$from.">\r\n".
|
1190 |
-
$content_type.
|
1191 |
-
"X-Mailer: PHP/" . phpversion());
|
1192 |
-
if ($_POST[$to] != $payer_email && $payer_email != '')
|
1193 |
-
wp_mail(trim($payer_email), $subject, $message,
|
1194 |
-
"From: \"$from\" <".$from.">\r\n".
|
1195 |
-
$content_type.
|
1196 |
-
"X-Mailer: PHP/" . phpversion());
|
1197 |
-
}
|
1198 |
-
|
1199 |
-
}
|
1200 |
-
|
1201 |
-
function cp_ppp_get_field_name ($fieldid, $form)
|
1202 |
-
{
|
1203 |
-
if (is_array($form))
|
1204 |
-
foreach($form as $item)
|
1205 |
-
if ($item->name == $fieldid)
|
1206 |
-
return $item->title;
|
1207 |
-
return $fieldid;
|
1208 |
-
}
|
1209 |
-
|
1210 |
-
function cp_ppp_export_csv ()
|
1211 |
-
{
|
1212 |
-
if (!is_admin())
|
1213 |
-
return;
|
1214 |
-
global $wpdb;
|
1215 |
-
|
1216 |
-
if (!defined('CP_PPP_ID'))
|
1217 |
-
define ('CP_PPP_ID',intval($_GET["cal"]));
|
1218 |
-
|
1219 |
-
$form_data = json_decode(cp_ppp_cleanJSON(cp_ppp_get_option('form_structure', CP_PPP_DEFAULT_form_structure)));
|
1220 |
-
|
1221 |
-
$cond = '';
|
1222 |
-
if ($_GET["search"] != '') $cond .= " AND (data like '%".esc_sql($_GET["search"])."%' OR paypal_post LIKE '%".esc_sql($_GET["search"])."%')";
|
1223 |
-
if ($_GET["dfrom"] != '') $cond .= " AND (`time` >= '".esc_sql($_GET["dfrom"])."')";
|
1224 |
-
if ($_GET["dto"] != '') $cond .= " AND (`time` <= '".esc_sql($_GET["dto"])." 23:59:59')";
|
1225 |
-
if (CP_PPP_ID != 0) $cond .= " AND formid=".CP_PPP_ID;
|
1226 |
-
|
1227 |
-
$events = $wpdb->get_results( "SELECT * FROM ".CP_PPP_POSTS_TABLE_NAME." WHERE 1=1 ".$cond." ORDER BY `time` DESC" );
|
1228 |
-
|
1229 |
-
$fields = array("Form ID", "ItemNumber","Time", "IP Address", "email", "Paid");
|
1230 |
-
$values = array();
|
1231 |
-
foreach ($events as $item)
|
1232 |
-
{
|
1233 |
-
$value = array($item->formid, $item->id, $item->time, $item->ipaddr, $item->notifyto, ($item->paid?"Yes":"No"));
|
1234 |
-
$data = array();
|
1235 |
-
if ($item->posted_data)
|
1236 |
-
$data = unserialize($item->posted_data);
|
1237 |
-
else if (!$item->paid)
|
1238 |
-
$data = unserialize($item->paypal_post);
|
1239 |
-
|
1240 |
-
$end = count($fields);
|
1241 |
-
for ($i=0; $i<$end; $i++)
|
1242 |
-
if (isset($data[$fields[$i]]) ){
|
1243 |
-
$value[$i] = $data[$fields[$i]];
|
1244 |
-
unset($data[$fields[$i]]);
|
1245 |
-
}
|
1246 |
-
|
1247 |
-
foreach ($data as $k => $d)
|
1248 |
-
{
|
1249 |
-
$fields[] = $k;
|
1250 |
-
$value[] = $d;
|
1251 |
-
}
|
1252 |
-
$values[] = $value;
|
1253 |
-
}
|
1254 |
-
|
1255 |
-
|
1256 |
-
header("Content-type: application/octet-stream");
|
1257 |
-
header("Content-Disposition: attachment; filename=export.csv");
|
1258 |
-
|
1259 |
-
$end = count($fields);
|
1260 |
-
for ($i=0; $i<$end; $i++)
|
1261 |
-
echo '"'.str_replace('"','""', cp_ppp_get_field_name($fields[$i],@$form_data[0])).'",';
|
1262 |
-
echo "\n";
|
1263 |
-
foreach ($values as $item)
|
1264 |
-
{
|
1265 |
-
for ($i=0; $i<$end; $i++)
|
1266 |
-
{
|
1267 |
-
if (!isset($item[$i]))
|
1268 |
-
$item[$i] = '';
|
1269 |
-
if (is_array($item[$i]))
|
1270 |
-
$item[$i] = implode($item[$i],',');
|
1271 |
-
echo '"'.str_replace('"','""', $item[$i]).'",';
|
1272 |
-
}
|
1273 |
-
echo "\n";
|
1274 |
-
}
|
1275 |
-
|
1276 |
-
exit;
|
1277 |
-
}
|
1278 |
-
|
1279 |
-
function cp_ppp_update_script_method()
|
1280 |
-
{
|
1281 |
-
global $wpdb;
|
1282 |
-
update_option( 'CP_CFPP_LOAD_SCRIPTS', ($_GET['script_load_method']=="1"?false:true) );
|
1283 |
-
echo '<br />Script Loading Method Updated.';
|
1284 |
-
exit;
|
1285 |
-
}
|
1286 |
-
|
1287 |
-
function cp_ppp_save_options()
|
1288 |
-
{
|
1289 |
-
global $wpdb;
|
1290 |
-
if (!defined('CP_PPP_ID'))
|
1291 |
-
define ('CP_PPP_ID',intval($_POST["cp_ppp_id"]));
|
1292 |
-
|
1293 |
-
foreach ($_POST as $item => $value)
|
1294 |
-
if (!is_array($value))
|
1295 |
-
$_POST[$item] = stripcslashes($value);
|
1296 |
-
|
1297 |
-
$data = array(
|
1298 |
-
'form_structure' => $_POST['form_structure'],
|
1299 |
-
|
1300 |
-
'fp_from_email' => $_POST['fp_from_email'],
|
1301 |
-
'fp_destination_emails' => $_POST['fp_destination_emails'],
|
1302 |
-
'fp_subject' => $_POST['fp_subject'],
|
1303 |
-
'fp_inc_additional_info' => $_POST['fp_inc_additional_info'],
|
1304 |
-
'fp_return_page' => $_POST['fp_return_page'],
|
1305 |
-
'fp_message' => $_POST['fp_message'],
|
1306 |
-
'fp_emailformat' => $_POST['fp_emailformat'],
|
1307 |
-
|
1308 |
-
'cu_enable_copy_to_user' => $_POST['cu_enable_copy_to_user'],
|
1309 |
-
'cu_user_email_field' => $_POST['cu_user_email_field'],
|
1310 |
-
'cu_subject' => $_POST['cu_subject'],
|
1311 |
-
'cu_message' => $_POST['cu_message'],
|
1312 |
-
'cu_emailformat' => $_POST['cu_emailformat'],
|
1313 |
-
|
1314 |
-
'enable_paypal' => @$_POST["enable_paypal"],
|
1315 |
-
'paypal_notiemails' => @$_POST["paypal_notiemails"],
|
1316 |
-
'paypal_email' => $_POST["paypal_email"],
|
1317 |
-
'request_cost' => $_POST["request_cost"],
|
1318 |
-
'paypal_price_field' => @$_POST["paypal_price_field"],
|
1319 |
-
'request_taxes' => $_POST["request_taxes"],
|
1320 |
-
'request_address' => $_POST["request_address"],
|
1321 |
-
'paypal_product_name' => $_POST["paypal_product_name"],
|
1322 |
-
'currency' => $_POST["currency"],
|
1323 |
-
'paypal_language' => $_POST["paypal_language"],
|
1324 |
-
'paypal_mode' => $_POST["paypal_mode"],
|
1325 |
-
'paypal_recurrent' => $_POST["paypal_recurrent"],
|
1326 |
-
'paypal_identify_prices' => @$_POST["paypal_identify_prices"],
|
1327 |
-
'paypal_zero_payment' => $_POST["paypal_zero_payment"],
|
1328 |
-
|
1329 |
-
'paypalpro_api_username' => $_POST["paypalpro_api_username"],
|
1330 |
-
'paypalpro_api_password' => $_POST["paypalpro_api_password"],
|
1331 |
-
'paypalpro_api_signature' => $_POST["paypalpro_api_signature"],
|
1332 |
-
|
1333 |
-
'cp_user_access' => serialize(@$_POST["cp_user_access"]),
|
1334 |
-
|
1335 |
-
'enable_paypal_option_yes' => (@$_POST['enable_paypal_option_yes']?$_POST['enable_paypal_option_yes']:CP_PPP_PAYPAL_OPTION_YES),
|
1336 |
-
'enable_paypal_option_no' => (@$_POST['enable_paypal_option_no']?$_POST['enable_paypal_option_no']:CP_PPP_PAYPAL_OPTION_NO),
|
1337 |
-
|
1338 |
-
'paypal_recurrent_setup' => @$_POST["paypal_recurrent_setup"],
|
1339 |
-
|
1340 |
-
//'vs_use_validation' => $_POST['vs_use_validation'],
|
1341 |
-
'vs_text_is_required' => $_POST['vs_text_is_required'],
|
1342 |
-
'vs_text_is_email' => $_POST['vs_text_is_email'],
|
1343 |
-
'vs_text_datemmddyyyy' => $_POST['vs_text_datemmddyyyy'],
|
1344 |
-
'vs_text_dateddmmyyyy' => $_POST['vs_text_dateddmmyyyy'],
|
1345 |
-
'vs_text_number' => $_POST['vs_text_number'],
|
1346 |
-
'vs_text_digits' => $_POST['vs_text_digits'],
|
1347 |
-
'vs_text_max' => $_POST['vs_text_max'],
|
1348 |
-
'vs_text_min' => $_POST['vs_text_min'],
|
1349 |
-
'vs_text_submitbtn' => $_POST['vs_text_submitbtn'],
|
1350 |
-
'vs_text_previousbtn' => $_POST['vs_text_previousbtn'],
|
1351 |
-
'vs_text_nextbtn' => $_POST['vs_text_nextbtn'],
|
1352 |
-
|
1353 |
-
'cv_enable_captcha' => $_POST['cv_enable_captcha'],
|
1354 |
-
'cv_width' => $_POST['cv_width'],
|
1355 |
-
'cv_height' => $_POST['cv_height'],
|
1356 |
-
'cv_chars' => $_POST['cv_chars'],
|
1357 |
-
'cv_font' => $_POST['cv_font'],
|
1358 |
-
'cv_min_font_size' => $_POST['cv_min_font_size'],
|
1359 |
-
'cv_max_font_size' => $_POST['cv_max_font_size'],
|
1360 |
-
'cv_noise' => $_POST['cv_noise'],
|
1361 |
-
'cv_noise_length' => $_POST['cv_noise_length'],
|
1362 |
-
'cv_background' => $_POST['cv_background'],
|
1363 |
-
'cv_border' => $_POST['cv_border'],
|
1364 |
-
'cv_text_enter_valid_captcha' => $_POST['cv_text_enter_valid_captcha']
|
1365 |
-
);
|
1366 |
-
$wpdb->update ( $wpdb->prefix.CP_PPP_FORMS_TABLE, $data, array( 'id' => CP_PPP_ID ));
|
1367 |
-
|
1368 |
-
}
|
1369 |
-
|
1370 |
-
// cp_ppp_get_option:
|
1371 |
-
$cp_ppp_option_buffered_item = false;
|
1372 |
-
$cp_ppp_option_buffered_id = -1;
|
1373 |
-
|
1374 |
-
function cp_ppp_get_option ($field, $default_value, $id = '')
|
1375 |
-
{
|
1376 |
-
if (!defined("CP_PPP_ID"))
|
1377 |
-
{
|
1378 |
-
if (!(isset($_GET["itemnumber"]) && intval($_GET["itemnumber"]) != ''))
|
1379 |
-
define ("CP_PPP_ID", 1);
|
1380 |
-
}
|
1381 |
-
if ($id == '')
|
1382 |
-
$id = CP_PPP_ID;
|
1383 |
-
global $wpdb, $cp_ppp_option_buffered_item, $cp_ppp_option_buffered_id;
|
1384 |
-
if ($cp_ppp_option_buffered_id == $id)
|
1385 |
-
$value = @$cp_ppp_option_buffered_item->$field;
|
1386 |
-
else
|
1387 |
-
{
|
1388 |
-
$myrows = $wpdb->get_results( $wpdb->prepare("SELECT * FROM ".$wpdb->prefix.CP_PPP_FORMS_TABLE." WHERE id=%d", $id) );
|
1389 |
-
$value = @$myrows[0]->$field;
|
1390 |
-
$cp_ppp_option_buffered_item = $myrows[0];
|
1391 |
-
$cp_ppp_option_buffered_id = $id;
|
1392 |
-
}
|
1393 |
-
if ($value == '' && $cp_ppp_option_buffered_item->form_structure == '')
|
1394 |
-
$value = $default_value;
|
1395 |
-
return $value;
|
1396 |
-
}
|
1397 |
-
|
1398 |
-
|
1399 |
-
// WIDGET CODE BELOW
|
1400 |
-
// ***********************************************************************
|
1401 |
-
|
1402 |
-
class CP_PPP_Widget extends WP_Widget
|
1403 |
-
{
|
1404 |
-
function __construct()
|
1405 |
-
{
|
1406 |
-
$widget_ops = array('classname' => 'CP_PPP_Widget', 'description' => 'Displays a form integrated with Paypal' );
|
1407 |
-
parent::__construct('CP_PPP_Widget', 'Payment Form for PayPal Pro', $widget_ops);
|
1408 |
-
}
|
1409 |
-
|
1410 |
-
function form($instance)
|
1411 |
-
{
|
1412 |
-
$instance = wp_parse_args( (array) $instance, array( 'title' => '', 'formid' => '' ) );
|
1413 |
-
$title = $instance['title'];
|
1414 |
-
$formid = $instance['formid'];
|
1415 |
-
?><p><label for="<?php echo $this->get_field_id('title'); ?>">Title: <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo esc_attr($title); ?>" /></label>
|
1416 |
-
<label for="<?php echo $this->get_field_id('formid'); ?>">Form ID: <input class="widefat" id="<?php echo $this->get_field_id('formid'); ?>" name="<?php echo $this->get_field_name('formid'); ?>" type="text" value="<?php echo esc_attr($formid); ?>" /></label>
|
1417 |
-
</p><?php
|
1418 |
-
}
|
1419 |
-
|
1420 |
-
function update($new_instance, $old_instance)
|
1421 |
-
{
|
1422 |
-
$instance = $old_instance;
|
1423 |
-
$instance['title'] = $new_instance['title'];
|
1424 |
-
$instance['formid'] = $new_instance['formid'];
|
1425 |
-
return $instance;
|
1426 |
-
}
|
1427 |
-
|
1428 |
-
function widget($args, $instance)
|
1429 |
-
{
|
1430 |
-
extract($args, EXTR_SKIP);
|
1431 |
-
|
1432 |
-
echo $before_widget;
|
1433 |
-
$title = empty($instance['title']) ? ' ' : apply_filters('widget_title', $instance['title']);
|
1434 |
-
$formid = $instance['formid'];
|
1435 |
-
|
1436 |
-
if (!empty($title))
|
1437 |
-
echo $before_title . $title . $after_title;
|
1438 |
-
|
1439 |
-
if ($formid != '' && !defined('CP_PPP_ID'))
|
1440 |
-
define ('CP_PPP_ID',$formid);
|
1441 |
-
|
1442 |
-
// WIDGET CODE GOES HERE
|
1443 |
-
cp_ppp_get_public_form($formid);
|
1444 |
-
|
1445 |
-
echo $after_widget;
|
1446 |
-
}
|
1447 |
-
|
1448 |
-
}
|
1449 |
-
|
1450 |
-
|
1451 |
-
|
1452 |
-
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
cp_ppp_admin_int.php
DELETED
@@ -1,723 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
if ( !is_admin() )
|
4 |
-
{
|
5 |
-
echo 'Direct access not allowed.';
|
6 |
-
exit;
|
7 |
-
}
|
8 |
-
|
9 |
-
global $wpdb;
|
10 |
-
|
11 |
-
if (!defined('CP_PPP_ID'))
|
12 |
-
define ('CP_PPP_ID',intval($_GET["cal"]));
|
13 |
-
|
14 |
-
|
15 |
-
define('CP_PPP_DEFAULT_fp_from_email', get_the_author_meta('user_email', get_current_user_id()) );
|
16 |
-
define('CP_PPP_DEFAULT_fp_destination_emails', CP_PPP_DEFAULT_fp_from_email);
|
17 |
-
|
18 |
-
if ( 'POST' == $_SERVER['REQUEST_METHOD'] && isset( $_POST['cp_ppp_post_options'] ) )
|
19 |
-
echo "<div id='setting-error-settings_updated' class='updated settings-error'> <p><strong>Settings saved.</strong></p></div>";
|
20 |
-
|
21 |
-
$scriptmethod = cp_ppp_get_option('script_load_method','0');
|
22 |
-
|
23 |
-
?>
|
24 |
-
<div class="wrap">
|
25 |
-
<h2>Payment Form for PayPal Pro</h2>
|
26 |
-
|
27 |
-
<script type="text/javascript">
|
28 |
-
$easyFormQueryPPP = jQuery.noConflict();
|
29 |
-
window.$ = jQuery;
|
30 |
-
if (typeof $easyFormQueryPPP == 'undefined')
|
31 |
-
{
|
32 |
-
// This code won't be used in most cases. This code is for preventing problems in wrong WP themes and conflicts with third party plugins.
|
33 |
-
alert('JQuery not detected in your WordPress, some features may not work. You can contact our support service for more information: http://wordpress.dwbooster.com/support');
|
34 |
-
}
|
35 |
-
</script>
|
36 |
-
|
37 |
-
<input type="button" name="backbtn" value="Back to items list..." onclick="document.location='options-general.php?page=cp_ppp';">
|
38 |
-
<br /><br />
|
39 |
-
|
40 |
-
<form method="post" action="" name="cpformconf">
|
41 |
-
<input name="cp_ppp_post_options" type="hidden" value="1" />
|
42 |
-
<input name="cp_ppp_id" type="hidden" value="<?php echo CP_PPP_ID; ?>" />
|
43 |
-
|
44 |
-
|
45 |
-
<div style="border:1px solid black;background-color:#ffffaa;padding:10px;">
|
46 |
-
This plugin is for integrating <strong>PayPal Pro</strong> to accept credit cards directly into your website
|
47 |
-
without navigating to a PayPal hosted payment page.
|
48 |
-
<br><br />
|
49 |
-
<strong>The PayPal integration available in this plugin requires a PayPal Pro account.</strong>
|
50 |
-
<br><br />
|
51 |
-
If you aren't sure if you have a <strong>PayPal Pro account</strong> or if you are looking for a classic <strong>PayPal Standard</strong> integration
|
52 |
-
then use the <a href="http://wordpress.dwbooster.com/forms/cp-contact-form-with-paypal">CP Contact Form with PayPal</a> plugin.
|
53 |
-
<br /><br />
|
54 |
-
You can check the differences betwen <strong>PayPal Pro</strong> and <strong>PayPal Standard</strong> at <a href="https://www.paypal.com/webapps/mpp/compare-business-products" target="_blank">https://www.paypal.com/webapps/mpp/compare-business-products</a>
|
55 |
-
</div>
|
56 |
-
|
57 |
-
<br />
|
58 |
-
|
59 |
-
<div id="normal-sortables" class="meta-box-sortables">
|
60 |
-
|
61 |
-
|
62 |
-
<div id="metabox_basic_settings" class="postbox" >
|
63 |
-
<h3 class='hndle' style="padding:5px;"><span>Paypal Payment Configuration</span></h3>
|
64 |
-
<div class="inside">
|
65 |
-
|
66 |
-
<table class="form-table">
|
67 |
-
|
68 |
-
<tr valign="top">
|
69 |
-
<th scope="row">Type of Paypal Integration:</th>
|
70 |
-
<td><select name="enable_paypal" onchange="cfpp_update_pp_payment_selection();">
|
71 |
-
<option value="3" <?php if (cp_ppp_get_option('enable_paypal',CP_PPP_DEFAULT_ENABLE_PAYPAL) == '3') echo 'selected'; ?> >PayPal Pro</option>
|
72 |
-
</select>
|
73 |
-
<br /><em style="font-size:11px;">Note: This plugin is for <strong>PayPal Pro</strong> payments. For <strong>PayPal Standard</strong> use the <a href="http://wordpress.dwbooster.com/forms/cp-contact-form-with-paypal">CP Contact Form with PayPal plugin</a>.</em>
|
74 |
-
|
75 |
-
<div id="cfpp_paypal_options_label" style="display:none;margin-top:10px;background:#EEF5FB;border: 1px dotted #888888;padding:10px;width:260px;">
|
76 |
-
Label for the "<strong>Pay with PayPal</strong>" option:<br />
|
77 |
-
<input type="text" name="enable_paypal_option_yes" size="40" style="width:250px;" value="<?php echo esc_attr(cp_ppp_get_option('enable_paypal_option_yes',CP_PPP_DEFAULT_PAYPAL_OPTION_YES)); ?>" />
|
78 |
-
<br />
|
79 |
-
Label for the "<strong>Pay later</strong>" option:<br />
|
80 |
-
<input type="text" name="enable_paypal_option_no" size="40" style="width:250px;" value="<?php echo esc_attr(cp_ppp_get_option('enable_paypal_option_no',CP_PPP_DEFAULT_PAYPAL_OPTION_NO)); ?>" />
|
81 |
-
</div>
|
82 |
-
|
83 |
-
<div id="cfpp_paypal_options_pro" style="display:none;margin-top:10px;background:#EEF5FB;border: 1px dotted #888888;padding:10px;width:570px;">
|
84 |
-
<table>
|
85 |
-
<tr valign="top">
|
86 |
-
<th scope="row">PayPal Pro <nobr>API UserName</nobr></th>
|
87 |
-
<td><input type="text" name="paypalpro_api_username" size="40" value="<?php echo esc_attr(cp_ppp_get_option('paypalpro_api_username','')); ?>" /></td>
|
88 |
-
</tr>
|
89 |
-
<tr valign="top">
|
90 |
-
<th scope="row">PayPal Pro <nobr>API Password</nobr></th>
|
91 |
-
<td><input type="text" name="paypalpro_api_password" size="20" value="<?php echo esc_attr(cp_ppp_get_option('paypalpro_api_password','')); ?>" /></td>
|
92 |
-
</tr>
|
93 |
-
<tr valign="top">
|
94 |
-
<th scope="row">PayPal Pro <nobr>API Signature</nobr></th>
|
95 |
-
<td><input type="text" name="paypalpro_api_signature" size="60" value="<?php echo esc_attr(cp_ppp_get_option('paypalpro_api_signature','')); ?>" /></td>
|
96 |
-
</tr>
|
97 |
-
</table>
|
98 |
-
</div>
|
99 |
-
</td>
|
100 |
-
</tr>
|
101 |
-
|
102 |
-
<tr valign="top" style="display:none">
|
103 |
-
<th scope="row">When should be sent the notification-confirmation emails?</th>
|
104 |
-
<td><select name="paypal_notiemails">
|
105 |
-
<option value="0" <?php if (cp_ppp_get_option('paypal_notiemails','0') != '0') echo 'selected'; ?>>When paid: AFTER receiving the PayPal payment</option>
|
106 |
-
<option value="1" <?php if (cp_ppp_get_option('paypal_notiemails','1') == '1') echo 'selected'; ?>>Always: BEFORE receiving the PayPal payment</option>
|
107 |
-
</select>
|
108 |
-
</td>
|
109 |
-
</tr>
|
110 |
-
|
111 |
-
<tr valign="top">
|
112 |
-
<th scope="row">Paypal Mode</th>
|
113 |
-
<td><select name="paypal_mode">
|
114 |
-
<option value="production" <?php if (cp_ppp_get_option('paypal_mode',CP_PPP_DEFAULT_PAYPAL_MODE) != 'sandbox') echo 'selected'; ?>>Production - real payments processed</option>
|
115 |
-
<option value="sandbox" <?php if (cp_ppp_get_option('paypal_mode',CP_PPP_DEFAULT_PAYPAL_MODE) == 'sandbox') echo 'selected'; ?>>SandBox - PayPal testing sandbox area</option>
|
116 |
-
</select>
|
117 |
-
</td>
|
118 |
-
</tr>
|
119 |
-
|
120 |
-
<tr valign="top" style="display:none">
|
121 |
-
<th scope="row">Paypal email</th>
|
122 |
-
<td><input type="text" name="paypal_email" size="40" value="<?php echo esc_attr(cp_ppp_get_option('paypal_email',CP_PPP_DEFAULT_PAYPAL_EMAIL)); ?>" /></td>
|
123 |
-
</tr>
|
124 |
-
|
125 |
-
<tr valign="top">
|
126 |
-
<th scope="row">Request cost</th>
|
127 |
-
<td><input type="text" name="request_cost" value="<?php echo esc_attr(cp_ppp_get_option('request_cost',CP_PPP_DEFAULT_COST)); ?>" /></td>
|
128 |
-
</tr>
|
129 |
-
|
130 |
-
<tr valign="top">
|
131 |
-
<th scope="row">Currency</th>
|
132 |
-
<td><input type="text" name="currency" value="<?php echo esc_attr(cp_ppp_get_option('currency',CP_PPP_DEFAULT_CURRENCY)); ?>" /></td>
|
133 |
-
</tr>
|
134 |
-
|
135 |
-
<tr valign="top">
|
136 |
-
<th scope="row" colspan="2">---- The following fields are useful in the <a href="http://wordpress.dwbooster.com/forms/paypal-payment-pro-form#download">commercial version of the plugin</a>:</th>
|
137 |
-
</tr>
|
138 |
-
|
139 |
-
<tr valign="top" style="color:#cccccc">
|
140 |
-
<th scope="row" style="color:#cccccc">Automatically identify prices on dropdown and checkboxes?</th>
|
141 |
-
<td><input type="checkbox" name="paypal_identify_prices" value="1" <?php if (cp_ppp_get_option('paypal_identify_prices',CP_PPP_DEFAULT_PAYPAL_IDENTIFY_PRICES)) echo 'checked'; ?> />
|
142 |
-
<em>If marked, any price in the selected checkboxes and dropdown fields will be added to the above request cost.</em>
|
143 |
-
<br />
|
144 |
-
<div id="cpcfppmoreinlink" style="color:#cccccc">[<a href="javascript:displaymorein();">+ more information</a>]</div>
|
145 |
-
<div id="cpcfppmorein" style="display:none;border:1px solid black;background-color:#ffffaa;padding:10px;">
|
146 |
-
<p>If marked, any price in the selected checkboxes, radiobuttons and dropdown fields will be added to the above request cost.
|
147 |
-
Prices will be identified if are entered in the format $NNNN.NN, example: $30 , $24.99 and also $1,499.99</p>
|
148 |
-
<p>For example, you can create a drop-down/select field with these options:
|
149 |
-
<br /><br />
|
150 |
-
- 1 hour tutoring for $30<br />
|
151 |
-
- 2 hours tutoring for $60<br />
|
152 |
-
- 3 hours tutoring for $90<br />
|
153 |
-
- 4 hours tutoring for $120
|
154 |
-
</p>
|
155 |
-
<p>... and put the basic request cost to 0. After submission the price sent to PayPal will be the total sum of the selected options.</p>
|
156 |
-
[<a href="javascript:displaylessin();">- less information</a>]
|
157 |
-
</div>
|
158 |
-
<script type="text/javascript">
|
159 |
-
function displaymorein()
|
160 |
-
{
|
161 |
-
document.getElementById("cpcfppmorein").style.display="";
|
162 |
-
document.getElementById("cpcfppmoreinlink").style.display="none";
|
163 |
-
}
|
164 |
-
function displaylessin()
|
165 |
-
{
|
166 |
-
document.getElementById("cpcfppmorein").style.display="none";
|
167 |
-
document.getElementById("cpcfppmoreinlink").style.display="";
|
168 |
-
}
|
169 |
-
</script>
|
170 |
-
</td>
|
171 |
-
</tr>
|
172 |
-
|
173 |
-
<tr valign="top"style="color:#cccccc">
|
174 |
-
<th scope="row"style="color:#cccccc">Use a specific field from the form for the payment amount</th>
|
175 |
-
<td><select style="color:#cccccc" id="paypal_price_field" name="paypal_price_field" def="<?php echo esc_attr(cp_ppp_get_option('paypal_price_field', '')); ?>"></select>
|
176 |
-
<br /><em>If selected, any price in the selected field will be added to the above request cost. Use this field for example for having an open donation amount.</em>
|
177 |
-
</td>
|
178 |
-
</tr>
|
179 |
-
|
180 |
-
<tr valign="top" style="display:none">
|
181 |
-
<th scope="row">Taxes (percent)</th>
|
182 |
-
<td><input type="text" name="request_taxes" value="<?php echo esc_attr(cp_ppp_get_option('request_taxes','0')); ?>" /></td>
|
183 |
-
</tr>
|
184 |
-
|
185 |
-
<tr valign="top" style="display:none">
|
186 |
-
<th scope="row">Request address at PayPal</th>
|
187 |
-
<td><select name="request_address">
|
188 |
-
<option value="0" <?php if (cp_ppp_get_option('request_address','0') != '1') echo 'selected'; ?>>No</option>
|
189 |
-
<option value="1" <?php if (cp_ppp_get_option('request_address','0') == '1') echo 'selected'; ?>>Yes</option>
|
190 |
-
</select>
|
191 |
-
</td>
|
192 |
-
</tr>
|
193 |
-
|
194 |
-
<tr valign="top" style="display:none">
|
195 |
-
<th scope="row">A $0 amount to pay means:</th>
|
196 |
-
<td><select name="paypal_zero_payment">
|
197 |
-
<option value="0" <?php if (cp_ppp_get_option('paypal_zero_payment',CP_PPP_DEFAULT_PAYPAL_ZERO_PAYMENT) != '1') echo 'selected'; ?>>Let the user enter any amount at PayPal (ex: for a donation)</option>
|
198 |
-
<option value="1" <?php if (cp_ppp_get_option('paypal_zero_payment',CP_PPP_DEFAULT_PAYPAL_ZERO_PAYMENT) == '1') echo 'selected'; ?>>Don't require any payment. Form is submitted skiping the PayPal page.</option>
|
199 |
-
</select>
|
200 |
-
</td>
|
201 |
-
</tr>
|
202 |
-
|
203 |
-
<tr valign="top" style="display:none">
|
204 |
-
<th scope="row">Paypal product name</th>
|
205 |
-
<td><input type="text" name="paypal_product_name" size="50" value="<?php echo esc_attr(cp_ppp_get_option('paypal_product_name',CP_PPP_DEFAULT_PRODUCT_NAME)); ?>" /></td>
|
206 |
-
</tr>
|
207 |
-
|
208 |
-
<tr valign="top" style="display:none">
|
209 |
-
<th scope="row">Paypal language</th>
|
210 |
-
<td><input type="text" name="paypal_language" value="<?php echo esc_attr(cp_ppp_get_option('paypal_language',CP_PPP_DEFAULT_PAYPAL_LANGUAGE)); ?>" /></td>
|
211 |
-
</tr>
|
212 |
-
|
213 |
-
<tr valign="top" style="display:none">
|
214 |
-
<th scope="row">Payment frequency</th>
|
215 |
-
<td><select name="paypal_recurrent" id="paypal_recurrent" onchange="ppp_update_recurrent();">
|
216 |
-
<option value="0" <?php if (cp_ppp_get_option('paypal_recurrent',CP_PPP_DEFAULT_PAYPAL_RECURRENT) == '0' ||
|
217 |
-
cp_ppp_get_option('paypal_recurrent',CP_PPP_DEFAULT_PAYPAL_RECURRENT) == ''
|
218 |
-
) echo 'selected'; ?>>One time payment (default option, user is billed only once)</option>
|
219 |
-
<option value="0.4" <?php if (cp_ppp_get_option('paypal_recurrent',CP_PPP_DEFAULT_PAYPAL_RECURRENT) == '0.4') echo 'selected'; ?>>Bill the user every 1 week</option>
|
220 |
-
<option value="1" <?php if (cp_ppp_get_option('paypal_recurrent',CP_PPP_DEFAULT_PAYPAL_RECURRENT) == '1') echo 'selected'; ?>>Bill the user every 1 month</option>
|
221 |
-
<option value="3" <?php if (cp_ppp_get_option('paypal_recurrent',CP_PPP_DEFAULT_PAYPAL_RECURRENT) == '3') echo 'selected'; ?>>Bill the user every 3 months</option>
|
222 |
-
<option value="6" <?php if (cp_ppp_get_option('paypal_recurrent',CP_PPP_DEFAULT_PAYPAL_RECURRENT) == '6') echo 'selected'; ?>>Bill the user every 6 months</option>
|
223 |
-
<option value="12" <?php if (cp_ppp_get_option('paypal_recurrent',CP_PPP_DEFAULT_PAYPAL_RECURRENT) == '12') echo 'selected'; ?>>Bill the user every 12 months</option>
|
224 |
-
</select>
|
225 |
-
<div id="ppp_setupfee" style="width:350px;margin-top:5px;padding:5px;background-color:#ddddff;display:none;border:1px dotted black;">
|
226 |
-
First period price (ex: include setup fee here if any):<br />
|
227 |
-
<input type="text" name="paypal_recurrent_setup" size="10" value="<?php echo esc_attr(cp_ppp_get_option('paypal_recurrent_setup','0')); ?>" />
|
228 |
-
</div>
|
229 |
-
<script type="text/javascript">
|
230 |
-
function ppp_update_recurrent() {
|
231 |
-
var f = document.getElementById("paypal_recurrent");
|
232 |
-
if (f.options[f.options.selectedIndex].value != '0')
|
233 |
-
document.getElementById("ppp_setupfee").style .display = "";
|
234 |
-
else
|
235 |
-
document.getElementById("ppp_setupfee").style .display = "none";
|
236 |
-
}
|
237 |
-
ppp_update_recurrent();
|
238 |
-
</script>
|
239 |
-
</td>
|
240 |
-
</tr>
|
241 |
-
|
242 |
-
<tr valign="top"style="color:#cccccc">
|
243 |
-
<th scope="row" style="color:#cccccc">Discount Codes</th>
|
244 |
-
<td>
|
245 |
-
<div id="dex_nocodes_availmsg">Loading...</div>
|
246 |
-
|
247 |
-
<br />
|
248 |
-
<strong>Add new discount code:</strong>
|
249 |
-
<br />
|
250 |
-
<table border="0" cellpadding="0" cellspacing="0" style="margin-top:5px;">
|
251 |
-
<tr>
|
252 |
-
<td style="padding:0px;">Code:</td>
|
253 |
-
<td style="padding:0px;">Discount:</td>
|
254 |
-
<td style="padding:0px;">Can be used:</td>
|
255 |
-
<td style="padding:0px;">Valid until:</td>
|
256 |
-
<td style="padding:0px;"></td>
|
257 |
-
</tr>
|
258 |
-
<tr>
|
259 |
-
<td style="padding:0px;" nowrap><input style="color:#cccccc" type="text" name="dex_dc_code" id="dex_dc_code" size="4" value="" /> </td>
|
260 |
-
<td style="padding:0px;" nowrap><input style="color:#cccccc" type="text" size="3" name="dex_dc_discount" id="dex_dc_discount" value="25" /><select style="color:#cccccc" name="dex_dc_discounttype" id="dex_dc_discounttype">
|
261 |
-
<option value="0">Percent</option>
|
262 |
-
<option value="1">Fixed Value</option>
|
263 |
-
</select> </td>
|
264 |
-
<td style="padding:0px;" nowrap><select style="color:#cccccc" name="dex_dc_times" id="dex_dc_times">
|
265 |
-
<option value="0">Unlimited</option>
|
266 |
-
<?php for ($i=1;$i<20;$i++) { ?><option value="<?php echo $i; ?>"><?php echo $i; ?> times</option><?php } ?>
|
267 |
-
<?php for ($i=20;$i<50;$i+=5) { ?><option value="<?php echo $i; ?>"><?php echo $i; ?> times</option><?php } ?>
|
268 |
-
<?php for ($i=50;$i<500;$i+=10) { ?><option value="<?php echo $i; ?>"><?php echo $i; ?> times</option><?php } ?>
|
269 |
-
<?php for ($i=500;$i<10000;$i+=50) { ?><option value="<?php echo $i; ?>"><?php echo $i; ?></option><?php } ?>
|
270 |
-
</select> </td>
|
271 |
-
<td style="padding:0px;" nowrap><input style="color:#cccccc" type="text" size="10" name="dex_dc_expires" id="dex_dc_expires" value="" /> </td>
|
272 |
-
<td style="padding:0px;"><input style="color:#cccccc" type="button" name="dex_dc_subccode" id="dex_dc_subccode" value="Add" /></td>
|
273 |
-
</tr>
|
274 |
-
</table>
|
275 |
-
<em>Note: Expiration date based in server time. Server time now is <?php echo date("Y-m-d H:i"); ?></em>
|
276 |
-
</td>
|
277 |
-
</tr>
|
278 |
-
|
279 |
-
</table>
|
280 |
-
|
281 |
-
</div>
|
282 |
-
</div>
|
283 |
-
|
284 |
-
|
285 |
-
<div id="metabox_basic_settings" class="postbox" >
|
286 |
-
<h3 class='hndle' style="padding:5px;"><span>Notification Email Settings</span></h3>
|
287 |
-
<div class="inside">
|
288 |
-
<table class="form-table">
|
289 |
-
<tr valign="top">
|
290 |
-
<th scope="row">"From" email</th>
|
291 |
-
<td><input type="text" name="fp_from_email" size="40" value="<?php echo esc_attr(cp_ppp_get_option('fp_from_email', CP_PPP_DEFAULT_fp_from_email)); ?>" /></td>
|
292 |
-
</tr>
|
293 |
-
<tr valign="top">
|
294 |
-
<th scope="row">Destination emails (comma separated)</th>
|
295 |
-
<td><input type="text" name="fp_destination_emails" size="40" value="<?php echo esc_attr(cp_ppp_get_option('fp_destination_emails', CP_PPP_DEFAULT_fp_destination_emails)); ?>" /></td>
|
296 |
-
</tr>
|
297 |
-
<tr valign="top">
|
298 |
-
<th scope="row">Email subject</th>
|
299 |
-
<td><input type="text" name="fp_subject" size="70" value="<?php echo esc_attr(cp_ppp_get_option('fp_subject', CP_PPP_DEFAULT_fp_subject)); ?>" /></td>
|
300 |
-
</tr>
|
301 |
-
<tr valign="top">
|
302 |
-
<th scope="row">Include additional information?</th>
|
303 |
-
<td>
|
304 |
-
<?php $option = cp_ppp_get_option('fp_inc_additional_info', CP_PPP_DEFAULT_fp_inc_additional_info); ?>
|
305 |
-
<select name="fp_inc_additional_info">
|
306 |
-
<option value="true"<?php if ($option == 'true') echo ' selected'; ?>>Yes</option>
|
307 |
-
<option value="false"<?php if ($option == 'false') echo ' selected'; ?>>No</option>
|
308 |
-
</select>
|
309 |
-
</td>
|
310 |
-
</tr>
|
311 |
-
<tr valign="top">
|
312 |
-
<th scope="row">Thank you page (after sending the message)</th>
|
313 |
-
<td><input type="text" name="fp_return_page" size="70" value="<?php echo esc_attr(cp_ppp_get_option('fp_return_page', CP_PPP_DEFAULT_fp_return_page)); ?>" /></td>
|
314 |
-
</tr>
|
315 |
-
<tr valign="top">
|
316 |
-
<th scope="row">Email format?</th>
|
317 |
-
<td>
|
318 |
-
<?php $option = cp_ppp_get_option('fp_emailformat', CP_PPP_DEFAULT_email_format); ?>
|
319 |
-
<select name="fp_emailformat">
|
320 |
-
<option value="text"<?php if ($option != 'html') echo ' selected'; ?>>Plain Text (default)</option>
|
321 |
-
<option value="html"<?php if ($option == 'html') echo ' selected'; ?>>HTML (use html in the textarea below)</option>
|
322 |
-
</select>
|
323 |
-
</td>
|
324 |
-
</tr>
|
325 |
-
<tr valign="top">
|
326 |
-
<th scope="row">Message</th>
|
327 |
-
<td><textarea type="text" name="fp_message" rows="6" cols="80"><?php echo esc_attr(cp_ppp_get_option('fp_message', CP_PPP_DEFAULT_fp_message)); ?></textarea></td>
|
328 |
-
</tr>
|
329 |
-
</table>
|
330 |
-
</div>
|
331 |
-
</div>
|
332 |
-
|
333 |
-
<div id="metabox_basic_settings" class="postbox" >
|
334 |
-
<h3 class='hndle' style="padding:5px;"><span>Form Builder</span></h3>
|
335 |
-
<div class="inside">
|
336 |
-
|
337 |
-
<div style="border:1px solid black;background-color:#ffffaa;padding:10px;">
|
338 |
-
The following Form Builder is editable in the <a href="http://wordpress.dwbooster.com/forms/paypal-payment-pro-form#download">commercial version of the plugin</a>:
|
339 |
-
</div>
|
340 |
-
<br />
|
341 |
-
<input type="hidden" name="form_structure" id="form_structure" size="180" value="<?php echo str_replace('"','"',str_replace("\r","",str_replace("\n","",esc_attr(cp_ppp_cleanJSON(cp_ppp_get_option('form_structure', CP_PPP_DEFAULT_form_structure)))))); ?>" />
|
342 |
-
<input type="hidden" name="templates" id="templates" value="<?php echo esc_attr( json_encode( cp_ppp_available_templates() ) ); ?>" />
|
343 |
-
|
344 |
-
<script>
|
345 |
-
$contactFormPPQuery = jQuery.noConflict();
|
346 |
-
window.$ = jQuery;
|
347 |
-
$contactFormPPQuery(document).ready(function() {
|
348 |
-
var f = $contactFormPPQuery("#fbuilder").fbuilder();
|
349 |
-
|
350 |
-
f.fBuild.loadData( "form_structure", "templates" );
|
351 |
-
|
352 |
-
$contactFormPPQuery("#saveForm").click(function() {
|
353 |
-
f.fBuild.saveData("form_structure");
|
354 |
-
});
|
355 |
-
|
356 |
-
$contactFormPPQuery(".itemForm").click(function() {
|
357 |
-
f.fBuild.addItem($contactFormPPQuery(this).attr("id"));
|
358 |
-
});
|
359 |
-
|
360 |
-
$contactFormPPQuery( ".itemForm" ).draggable({revert1: "invalid",helper: "clone",cursor: "move"});
|
361 |
-
$contactFormPPQuery( "#fbuilder" ).droppable({
|
362 |
-
accept: ".button",
|
363 |
-
drop: function( event, ui ) {
|
364 |
-
f.fBuild.addItem(ui.draggable.attr("id"));
|
365 |
-
}
|
366 |
-
});
|
367 |
-
|
368 |
-
});
|
369 |
-
|
370 |
-
|
371 |
-
var $j = jQuery.noConflict();
|
372 |
-
window.$ = jQuery;
|
373 |
-
$j(function() {
|
374 |
-
$j("#dex_dc_expires").datepicker({
|
375 |
-
dateFormat: 'yy-mm-dd'
|
376 |
-
});
|
377 |
-
});
|
378 |
-
$j('#dex_nocodes_availmsg').load('<?php echo cp_ppp_get_site_url(true); ?>/?cp_ppp_post=loadcoupons&inAdmin=1&dex_item=<?php echo CP_PPP_ID; ?>');
|
379 |
-
$j('#dex_dc_subccode').click (function() {
|
380 |
-
var code = $j('#dex_dc_code').val();
|
381 |
-
var discount = $j('#dex_dc_discount').val();
|
382 |
-
var dc_times = $j('#dex_dc_times').val();
|
383 |
-
var discounttype = $j('#dex_dc_discounttype').val();
|
384 |
-
var expires = $j('#dex_dc_expires').val();
|
385 |
-
if (code == '') { alert('Please enter a code'); return; }
|
386 |
-
if (parseInt(discount)+"" != discount) { alert('Please numeric discount percent'); return; }
|
387 |
-
if (expires == '') { alert('Please enter an expiration date for the code'); return; }
|
388 |
-
var params = '&add=1&expires='+encodeURI(expires)+'&discount='+encodeURI(discount)+'&discounttype='+encodeURI(discounttype)+'&code='+encodeURI(code)+'&tm='+encodeURI(dc_times);
|
389 |
-
$j('#dex_nocodes_availmsg').load('<?php echo cp_ppp_get_site_url(true); ?>/?cp_ppp_post=loadcoupons&inAdmin=1&dex_item=<?php echo CP_PPP_ID; ?>'+params);
|
390 |
-
$j('#dex_dc_code').val();
|
391 |
-
});
|
392 |
-
|
393 |
-
function dex_delete_coupon(id)
|
394 |
-
{
|
395 |
-
$j('#dex_nocodes_availmsg').load('<?php echo cp_ppp_get_site_url(true); ?>/?cp_ppp_post=loadcoupons&inAdmin=1&dex_item=<?php echo CP_PPP_ID; ?>&delete=1&code='+id);
|
396 |
-
}
|
397 |
-
|
398 |
-
|
399 |
-
function generateCaptcha()
|
400 |
-
{
|
401 |
-
var d=new Date();
|
402 |
-
var f = document.cpformconf;
|
403 |
-
var qs = "&width="+f.cv_width.value;
|
404 |
-
qs += "&height="+f.cv_height.value;
|
405 |
-
qs += "&letter_count="+f.cv_chars.value;
|
406 |
-
qs += "&min_size="+f.cv_min_font_size.value;
|
407 |
-
qs += "&max_size="+f.cv_max_font_size.value;
|
408 |
-
qs += "&noise="+f.cv_noise.value;
|
409 |
-
qs += "&noiselength="+f.cv_noise_length.value;
|
410 |
-
qs += "&bcolor="+f.cv_background.value;
|
411 |
-
qs += "&border="+f.cv_border.value;
|
412 |
-
qs += "&font="+f.cv_font.options[f.cv_font.selectedIndex].value;
|
413 |
-
qs += "&rand="+d;
|
414 |
-
|
415 |
-
document.getElementById("captchaimg").src= "<?php echo cp_ppp_get_site_url(true); ?>/?cp_ppp=captcha&inAdmin=1"+qs;
|
416 |
-
}
|
417 |
-
|
418 |
-
|
419 |
-
function cfpp_update_pp_payment_selection()
|
420 |
-
{
|
421 |
-
var f = document.cpformconf;
|
422 |
-
var ppoption = f.enable_paypal.options[f.enable_paypal.selectedIndex].value;
|
423 |
-
if (ppoption == '2')
|
424 |
-
{
|
425 |
-
document.getElementById("cfpp_paypal_options_label").style.display = "";
|
426 |
-
document.getElementById("cfpp_paypal_options_pro").style.display = "none";
|
427 |
-
}
|
428 |
-
else if (ppoption == '3')
|
429 |
-
{
|
430 |
-
document.getElementById("cfpp_paypal_options_label").style.display = "none";
|
431 |
-
document.getElementById("cfpp_paypal_options_pro").style.display = "";
|
432 |
-
} else
|
433 |
-
{
|
434 |
-
document.getElementById("cfpp_paypal_options_label").style.display = "none";
|
435 |
-
document.getElementById("cfpp_paypal_options_pro").style.display = "none";
|
436 |
-
}
|
437 |
-
}
|
438 |
-
|
439 |
-
cfpp_update_pp_payment_selection();
|
440 |
-
|
441 |
-
</script>
|
442 |
-
|
443 |
-
<div style="background:#fafafa;width:780px;" class="form-builder">
|
444 |
-
|
445 |
-
<div class="column width50">
|
446 |
-
<div id="tabs">
|
447 |
-
<ul>
|
448 |
-
<li><a href="#tabs-1">Add a Field</a></li>
|
449 |
-
<li><a href="#tabs-2">Field Settings</a></li>
|
450 |
-
<li><a href="#tabs-3">Form Settings</a></li>
|
451 |
-
</ul>
|
452 |
-
<div id="tabs-1">
|
453 |
-
|
454 |
-
</div>
|
455 |
-
<div id="tabs-2"></div>
|
456 |
-
<div id="tabs-3"></div>
|
457 |
-
</div>
|
458 |
-
</div>
|
459 |
-
<div class="columnr width50 padding10" id="fbuilder">
|
460 |
-
<div id="formheader"></div>
|
461 |
-
<div id="fieldlist"></div>
|
462 |
-
<!--<div class="button" id="saveForm">Save Form</div>-->
|
463 |
-
</div>
|
464 |
-
<div class="clearer"></div>
|
465 |
-
|
466 |
-
</div>
|
467 |
-
|
468 |
-
</div>
|
469 |
-
</div>
|
470 |
-
|
471 |
-
<div id="metabox_basic_settings" class="postbox" >
|
472 |
-
<h3 class='hndle' style="padding:5px;"><span>Submit Button</span></h3>
|
473 |
-
<div class="inside">
|
474 |
-
<table class="form-table">
|
475 |
-
<tr valign="top">
|
476 |
-
<th scope="row">Submit button label (text):</th>
|
477 |
-
<td><input type="text" name="vs_text_submitbtn" size="40" value="<?php $label = esc_attr(cp_ppp_get_option('vs_text_submitbtn', 'Submit')); echo ($label==''?'Submit':$label); ?>" /></td>
|
478 |
-
</tr>
|
479 |
-
<tr valign="top">
|
480 |
-
<th scope="row">Previous button label (text):</th>
|
481 |
-
<td><input type="text" name="vs_text_previousbtn" size="40" value="<?php $label = esc_attr(cp_ppp_get_option('vs_text_previousbtn', 'Previous')); echo ($label==''?'Previous':$label); ?>" /></td>
|
482 |
-
</tr>
|
483 |
-
<tr valign="top">
|
484 |
-
<th scope="row">Next button label (text):</th>
|
485 |
-
<td><input type="text" name="vs_text_nextbtn" size="40" value="<?php $label = esc_attr(cp_ppp_get_option('vs_text_nextbtn', 'Next')); echo ($label==''?'Next':$label); ?>" /></td>
|
486 |
-
</tr>
|
487 |
-
<tr valign="top">
|
488 |
-
<td colspan="2"> - The <em>class="pbSubmit"</em> can be used to modify the button styles. <br />
|
489 |
-
- The styles can be applied into any of the CSS files of your theme or into the CSS file <em>"cp-contact-form-with-paypal\css\stylepublic.css"</em>. <br />
|
490 |
-
- For further modifications the submit button is located at the end of the file <em>"cp_ppp_public_int.inc.php"</em>.<br />
|
491 |
-
- For general CSS styles modifications to the form and samples <a href="http://wordpress.dwbooster.com/faq/cp-contact-form-with-paypal#q61" target="_blank">check this FAQ</a>.
|
492 |
-
</tr>
|
493 |
-
</table>
|
494 |
-
</div>
|
495 |
-
</div>
|
496 |
-
|
497 |
-
|
498 |
-
|
499 |
-
<div id="metabox_basic_settings" class="postbox" >
|
500 |
-
<h3 class='hndle' style="padding:5px;"><span>Validation Settings</span></h3>
|
501 |
-
<div class="inside">
|
502 |
-
<table class="form-table">
|
503 |
-
<tr valign="top">
|
504 |
-
<th scope="row">Use Validation?</th>
|
505 |
-
<td>
|
506 |
-
<?php $option = cp_ppp_get_option('vs_use_validation', CP_PPP_DEFAULT_vs_use_validation); ?>
|
507 |
-
<select name="vs_use_validation">
|
508 |
-
<option value="true"<?php if ($option == 'true') echo ' selected'; ?>>Yes</option>
|
509 |
-
<!--<option value="false"<?php if ($option == 'false') echo ' selected'; ?>>No</option>-->
|
510 |
-
</select>
|
511 |
-
</td>
|
512 |
-
</tr>
|
513 |
-
<tr valign="top">
|
514 |
-
<th scope="row">"is required" text:</th>
|
515 |
-
<td><input type="text" name="vs_text_is_required" size="40" value="<?php echo esc_attr(cp_ppp_get_option('vs_text_is_required', CP_PPP_DEFAULT_vs_text_is_required)); ?>" /></td>
|
516 |
-
</tr>
|
517 |
-
<tr valign="top">
|
518 |
-
<th scope="row">"is email" text:</th>
|
519 |
-
<td><input type="text" name="vs_text_is_email" size="70" value="<?php echo esc_attr(cp_ppp_get_option('vs_text_is_email', CP_PPP_DEFAULT_vs_text_is_email)); ?>" /></td>
|
520 |
-
</tr>
|
521 |
-
<tr valign="top">
|
522 |
-
<th scope="row">"is valid captcha" text:</th>
|
523 |
-
<td><input type="text" name="cv_text_enter_valid_captcha" size="70" value="<?php echo esc_attr(cp_ppp_get_option('cv_text_enter_valid_captcha', CP_PPP_DEFAULT_cv_text_enter_valid_captcha)); ?>" /></td>
|
524 |
-
</tr>
|
525 |
-
|
526 |
-
<tr valign="top">
|
527 |
-
<th scope="row">"is valid date (mm/dd/yyyy)" text:</th>
|
528 |
-
<td><input type="text" name="vs_text_datemmddyyyy" size="70" value="<?php echo esc_attr(cp_ppp_get_option('vs_text_datemmddyyyy', CP_PPP_DEFAULT_vs_text_datemmddyyyy)); ?>" /></td>
|
529 |
-
</tr>
|
530 |
-
<tr valign="top">
|
531 |
-
<th scope="row">"is valid date (dd/mm/yyyy)" text:</th>
|
532 |
-
<td><input type="text" name="vs_text_dateddmmyyyy" size="70" value="<?php echo esc_attr(cp_ppp_get_option('vs_text_dateddmmyyyy', CP_PPP_DEFAULT_vs_text_dateddmmyyyy)); ?>" /></td>
|
533 |
-
</tr>
|
534 |
-
<tr valign="top">
|
535 |
-
<th scope="row">"is number" text:</th>
|
536 |
-
<td><input type="text" name="vs_text_number" size="70" value="<?php echo esc_attr(cp_ppp_get_option('vs_text_number', CP_PPP_DEFAULT_vs_text_number)); ?>" /></td>
|
537 |
-
</tr>
|
538 |
-
<tr valign="top">
|
539 |
-
<th scope="row">"only digits" text:</th>
|
540 |
-
<td><input type="text" name="vs_text_digits" size="70" value="<?php echo esc_attr(cp_ppp_get_option('vs_text_digits', CP_PPP_DEFAULT_vs_text_digits)); ?>" /></td>
|
541 |
-
</tr>
|
542 |
-
<tr valign="top">
|
543 |
-
<th scope="row">"under maximum" text:</th>
|
544 |
-
<td><input type="text" name="vs_text_max" size="70" value="<?php echo esc_attr(cp_ppp_get_option('vs_text_max', CP_PPP_DEFAULT_vs_text_max)); ?>" /></td>
|
545 |
-
</tr>
|
546 |
-
<tr valign="top">
|
547 |
-
<th scope="row">"over minimum" text:</th>
|
548 |
-
<td><input type="text" name="vs_text_min" size="70" value="<?php echo esc_attr(cp_ppp_get_option('vs_text_min', CP_PPP_DEFAULT_vs_text_min)); ?>" /></td>
|
549 |
-
</tr>
|
550 |
-
|
551 |
-
</table>
|
552 |
-
</div>
|
553 |
-
</div>
|
554 |
-
|
555 |
-
|
556 |
-
|
557 |
-
<div id="metabox_basic_settings" class="postbox" >
|
558 |
-
<h3 class='hndle' style="padding:5px;"><span>Email Copy to User</span></h3>
|
559 |
-
<div class="inside">
|
560 |
-
<table class="form-table">
|
561 |
-
<tr valign="top">
|
562 |
-
<th scope="row">Send confirmation/thank you message to user?</th>
|
563 |
-
<td>
|
564 |
-
<?php $option = cp_ppp_get_option('cu_enable_copy_to_user', CP_PPP_DEFAULT_cu_enable_copy_to_user); ?>
|
565 |
-
<select name="cu_enable_copy_to_user">
|
566 |
-
<option value="true"<?php if ($option == 'true') echo ' selected'; ?>>Yes</option>
|
567 |
-
<option value="false"<?php if ($option == 'false') echo ' selected'; ?>>No</option>
|
568 |
-
</select>
|
569 |
-
</td>
|
570 |
-
</tr>
|
571 |
-
<tr valign="top">
|
572 |
-
<th scope="row">Email field on the form</th>
|
573 |
-
<td><select id="cu_user_email_field" name="cu_user_email_field" def="<?php echo esc_attr(cp_ppp_get_option('cu_user_email_field', CP_PPP_DEFAULT_cu_user_email_field)); ?>"></select></td>
|
574 |
-
</tr>
|
575 |
-
<tr valign="top">
|
576 |
-
<th scope="row">Email subject</th>
|
577 |
-
<td><input type="text" name="cu_subject" size="70" value="<?php echo esc_attr(cp_ppp_get_option('cu_subject', CP_PPP_DEFAULT_cu_subject)); ?>" /></td>
|
578 |
-
</tr>
|
579 |
-
<tr valign="top">
|
580 |
-
<th scope="row">Email format?</th>
|
581 |
-
<td>
|
582 |
-
<?php $option = cp_ppp_get_option('cu_emailformat', CP_PPP_DEFAULT_email_format); ?>
|
583 |
-
<select name="cu_emailformat">
|
584 |
-
<option value="text"<?php if ($option != 'html') echo ' selected'; ?>>Plain Text (default)</option>
|
585 |
-
<option value="html"<?php if ($option == 'html') echo ' selected'; ?>>HTML (use html in the textarea below)</option>
|
586 |
-
</select>
|
587 |
-
</td>
|
588 |
-
</tr>
|
589 |
-
<tr valign="top">
|
590 |
-
<th scope="row">Message</th>
|
591 |
-
<td><textarea type="text" name="cu_message" rows="6" cols="80"><?php echo esc_attr(cp_ppp_get_option('cu_message', CP_PPP_DEFAULT_cu_message)); ?></textarea></td>
|
592 |
-
</tr>
|
593 |
-
</table>
|
594 |
-
</div>
|
595 |
-
</div>
|
596 |
-
|
597 |
-
|
598 |
-
<div id="metabox_basic_settings" class="postbox" >
|
599 |
-
<h3 class='hndle' style="padding:5px;"><span>Captcha Verification</span></h3>
|
600 |
-
<div class="inside">
|
601 |
-
<table class="form-table">
|
602 |
-
<tr valign="top">
|
603 |
-
<th scope="row">Use Captcha Verification?</th>
|
604 |
-
<td colspan="5">
|
605 |
-
<?php $option = cp_ppp_get_option('cv_enable_captcha', CP_PPP_DEFAULT_cv_enable_captcha); ?>
|
606 |
-
<select name="cv_enable_captcha">
|
607 |
-
<option value="true"<?php if ($option == 'true') echo ' selected'; ?>>Yes</option>
|
608 |
-
<option value="false"<?php if ($option == 'false') echo ' selected'; ?>>No</option>
|
609 |
-
</select>
|
610 |
-
</td>
|
611 |
-
</tr>
|
612 |
-
|
613 |
-
<tr valign="top">
|
614 |
-
<th scope="row">Width:</th>
|
615 |
-
<td><input type="text" name="cv_width" size="10" value="<?php echo esc_attr(cp_ppp_get_option('cv_width', CP_PPP_DEFAULT_cv_width)); ?>" onblur="generateCaptcha();" /></td>
|
616 |
-
<th scope="row">Height:</th>
|
617 |
-
<td><input type="text" name="cv_height" size="10" value="<?php echo esc_attr(cp_ppp_get_option('cv_height', CP_PPP_DEFAULT_cv_height)); ?>" onblur="generateCaptcha();" /></td>
|
618 |
-
<th scope="row">Chars:</th>
|
619 |
-
<td><input type="text" name="cv_chars" size="10" value="<?php echo esc_attr(cp_ppp_get_option('cv_chars', CP_PPP_DEFAULT_cv_chars)); ?>" onblur="generateCaptcha();" /></td>
|
620 |
-
</tr>
|
621 |
-
|
622 |
-
<tr valign="top">
|
623 |
-
<th scope="row">Min font size:</th>
|
624 |
-
<td><input type="text" name="cv_min_font_size" size="10" value="<?php echo esc_attr(cp_ppp_get_option('cv_min_font_size', CP_PPP_DEFAULT_cv_min_font_size)); ?>" onblur="generateCaptcha();" /></td>
|
625 |
-
<th scope="row">Max font size:</th>
|
626 |
-
<td><input type="text" name="cv_max_font_size" size="10" value="<?php echo esc_attr(cp_ppp_get_option('cv_max_font_size', CP_PPP_DEFAULT_cv_max_font_size)); ?>" onblur="generateCaptcha();" /></td>
|
627 |
-
<td colspan="2" rowspan="">
|
628 |
-
Preview:<br />
|
629 |
-
<br />
|
630 |
-
<img src="<?php echo cp_ppp_get_site_url(true); ?>/?cp_ppp=captcha&inAdmin=1" id="captchaimg" alt="security code" border="0" />
|
631 |
-
</td>
|
632 |
-
</tr>
|
633 |
-
|
634 |
-
|
635 |
-
<tr valign="top">
|
636 |
-
<th scope="row">Noise:</th>
|
637 |
-
<td><input type="text" name="cv_noise" size="10" value="<?php echo esc_attr(cp_ppp_get_option('cv_noise', CP_PPP_DEFAULT_cv_noise)); ?>" onblur="generateCaptcha();" /></td>
|
638 |
-
<th scope="row">Noise Length:</th>
|
639 |
-
<td><input type="text" name="cv_noise_length" size="10" value="<?php echo esc_attr(cp_ppp_get_option('cv_noise_length', CP_PPP_DEFAULT_cv_noise_length)); ?>" onblur="generateCaptcha();" /></td>
|
640 |
-
</tr>
|
641 |
-
|
642 |
-
|
643 |
-
<tr valign="top">
|
644 |
-
<th scope="row">Background:</th>
|
645 |
-
<td><input type="text" name="cv_background" size="10" value="<?php echo esc_attr(cp_ppp_get_option('cv_background', CP_PPP_DEFAULT_cv_background)); ?>" onblur="generateCaptcha();" /></td>
|
646 |
-
<th scope="row">Border:</th>
|
647 |
-
<td><input type="text" name="cv_border" size="10" value="<?php echo esc_attr(cp_ppp_get_option('cv_border', CP_PPP_DEFAULT_cv_border)); ?>" onblur="generateCaptcha();" /></td>
|
648 |
-
</tr>
|
649 |
-
|
650 |
-
<tr valign="top">
|
651 |
-
<th scope="row">Font:</th>
|
652 |
-
<td>
|
653 |
-
<select name="cv_font" onchange="generateCaptcha();" >
|
654 |
-
<option value="font-1.ttf"<?php if ("font-1.ttf" == cp_ppp_get_option('cv_font', CP_PPP_DEFAULT_cv_font)) echo " selected"; ?>>Font 1</option>
|
655 |
-
<option value="font-2.ttf"<?php if ("font-2.ttf" == cp_ppp_get_option('cv_font', CP_PPP_DEFAULT_cv_font)) echo " selected"; ?>>Font 2</option>
|
656 |
-
<option value="font-3.ttf"<?php if ("font-3.ttf" == cp_ppp_get_option('cv_font', CP_PPP_DEFAULT_cv_font)) echo " selected"; ?>>Font 3</option>
|
657 |
-
<option value="font-4.ttf"<?php if ("font-4.ttf" == cp_ppp_get_option('cv_font', CP_PPP_DEFAULT_cv_font)) echo " selected"; ?>>Font 4</option>
|
658 |
-
</select>
|
659 |
-
</td>
|
660 |
-
</tr>
|
661 |
-
|
662 |
-
|
663 |
-
</table>
|
664 |
-
</div>
|
665 |
-
</div>
|
666 |
-
|
667 |
-
<div id="metabox_basic_settings" class="postbox" >
|
668 |
-
<h3 class='hndle' style="padding:5px;"><span>Users with access to the messages list</span></h3>
|
669 |
-
<div class="inside">
|
670 |
-
<table class="form-table">
|
671 |
-
<tr valign="top">
|
672 |
-
<th scope="row">Select users with access (CTRL+click for multiple selection):</th>
|
673 |
-
<td>
|
674 |
-
<?php
|
675 |
-
$users = $wpdb->get_results( "SELECT user_login,ID FROM ".$wpdb->users." ORDER BY ID DESC" );
|
676 |
-
$options = unserialize(cp_ppp_get_option('cp_user_access', array()));
|
677 |
-
?>
|
678 |
-
<select name="cp_user_access[]" multiple="multiple" size="5">
|
679 |
-
<?php foreach ($users as $user) { ?>
|
680 |
-
<option value="<?php echo $user->ID; ?>"<?php if ( in_array ($user->ID, $options) ) echo ' selected'; ?>><?php echo $user->user_login; ?></option>
|
681 |
-
<?php } ?>
|
682 |
-
</select>
|
683 |
-
</td>
|
684 |
-
</tr>
|
685 |
-
</table>
|
686 |
-
</div>
|
687 |
-
</div>
|
688 |
-
|
689 |
-
|
690 |
-
|
691 |
-
<div id="metabox_basic_settings" class="postbox" >
|
692 |
-
<h3 class='hndle' style="padding:5px;"><span>Note</span></h3>
|
693 |
-
<div class="inside">
|
694 |
-
To insert this form in a post/page, use the dedicated icon
|
695 |
-
<?php print '<a href="javascript:cp_ppp_insertForm();" title="'.__('Insert Payment Form for PayPal Pro').'"><img hspace="5" src="'.plugins_url('/images/cp_form.gif', __FILE__).'" alt="'.__('Insert Payment Form for PayPal Pro').'" /></a>'; ?>
|
696 |
-
which has been added to your Upload/Insert Menu, just below the title of your Post/Page.
|
697 |
-
<br /><br />
|
698 |
-
</div>
|
699 |
-
</div>
|
700 |
-
|
701 |
-
</div>
|
702 |
-
|
703 |
-
|
704 |
-
<p class="submit"><input type="submit" name="submit" id="submit" class="button-primary" value="Save Changes" /></p>
|
705 |
-
|
706 |
-
|
707 |
-
[<a href="http://wordpress.dwbooster.com/contact-us" target="_blank">Request Custom Modifications</a>] | [<a href="http://wordpress.dwbooster.com/forms/cp-contact-form-with-paypal" target="_blank">Help</a>]
|
708 |
-
</form>
|
709 |
-
</div>
|
710 |
-
<script type="text/javascript">generateCaptcha();</script>
|
711 |
-
|
712 |
-
|
713 |
-
|
714 |
-
|
715 |
-
|
716 |
-
|
717 |
-
|
718 |
-
|
719 |
-
|
720 |
-
|
721 |
-
|
722 |
-
|
723 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
cp_ppp_admin_int_list.inc.php
DELETED
@@ -1,300 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
if ( !is_admin() )
|
4 |
-
{
|
5 |
-
echo 'Direct access not allowed.';
|
6 |
-
exit;
|
7 |
-
}
|
8 |
-
|
9 |
-
global $wpdb;
|
10 |
-
$message = "";
|
11 |
-
|
12 |
-
$current_user_access = current_user_can('manage_options');
|
13 |
-
|
14 |
-
if (isset($_GET['a']) && $_GET['a'] == '1' && $current_user_access)
|
15 |
-
{
|
16 |
-
define('CP_PPP_DEFAULT_fp_from_email', get_the_author_meta('user_email', get_current_user_id()) );
|
17 |
-
define('CP_PPP_DEFAULT_fp_destination_emails', CP_PPP_DEFAULT_fp_from_email);
|
18 |
-
|
19 |
-
// insert line
|
20 |
-
$wpdb->insert( $wpdb->prefix.CP_PPP_FORMS_TABLE, array(
|
21 |
-
'form_name' => stripcslashes($_GET["name"]),
|
22 |
-
|
23 |
-
'form_structure' => CP_PPP_DEFAULT_form_structure,
|
24 |
-
|
25 |
-
'fp_from_email' => cp_ppp_get_option('fp_from_email', CP_PPP_DEFAULT_fp_from_email),
|
26 |
-
'fp_destination_emails' => cp_ppp_get_option('fp_destination_emails', CP_PPP_DEFAULT_fp_destination_emails),
|
27 |
-
'fp_subject' => cp_ppp_get_option('fp_subject', CP_PPP_DEFAULT_fp_subject),
|
28 |
-
'fp_inc_additional_info' => cp_ppp_get_option('fp_inc_additional_info', CP_PPP_DEFAULT_fp_inc_additional_info),
|
29 |
-
'fp_return_page' => cp_ppp_get_option('fp_return_page', CP_PPP_DEFAULT_fp_return_page),
|
30 |
-
'fp_message' => cp_ppp_get_option('fp_message', CP_PPP_DEFAULT_fp_message),
|
31 |
-
'fp_emailformat' => cp_ppp_get_option('fp_emailformat', CP_PPP_DEFAULT_email_format),
|
32 |
-
|
33 |
-
'cu_enable_copy_to_user' => cp_ppp_get_option('cu_enable_copy_to_user', CP_PPP_DEFAULT_cu_enable_copy_to_user),
|
34 |
-
'cu_user_email_field' => cp_ppp_get_option('cu_user_email_field', CP_PPP_DEFAULT_cu_user_email_field),
|
35 |
-
'cu_subject' => cp_ppp_get_option('cu_subject', CP_PPP_DEFAULT_cu_subject),
|
36 |
-
'cu_message' => cp_ppp_get_option('cu_message', CP_PPP_DEFAULT_cu_message),
|
37 |
-
'cu_emailformat' => cp_ppp_get_option('cu_emailformat', CP_PPP_DEFAULT_email_format),
|
38 |
-
|
39 |
-
'vs_use_validation' => cp_ppp_get_option('vs_use_validation', CP_PPP_DEFAULT_vs_use_validation),
|
40 |
-
'vs_text_is_required' => cp_ppp_get_option('vs_text_is_required', CP_PPP_DEFAULT_vs_text_is_required),
|
41 |
-
'vs_text_is_email' => cp_ppp_get_option('vs_text_is_email', CP_PPP_DEFAULT_vs_text_is_email),
|
42 |
-
'vs_text_datemmddyyyy' => cp_ppp_get_option('vs_text_datemmddyyyy', CP_PPP_DEFAULT_vs_text_datemmddyyyy),
|
43 |
-
'vs_text_dateddmmyyyy' => cp_ppp_get_option('vs_text_dateddmmyyyy', CP_PPP_DEFAULT_vs_text_dateddmmyyyy),
|
44 |
-
'vs_text_number' => cp_ppp_get_option('vs_text_number', CP_PPP_DEFAULT_vs_text_number),
|
45 |
-
'vs_text_digits' => cp_ppp_get_option('vs_text_digits', CP_PPP_DEFAULT_vs_text_digits),
|
46 |
-
'vs_text_max' => cp_ppp_get_option('vs_text_max', CP_PPP_DEFAULT_vs_text_max),
|
47 |
-
'vs_text_min' => cp_ppp_get_option('vs_text_min', CP_PPP_DEFAULT_vs_text_min),
|
48 |
-
|
49 |
-
'enable_paypal' => cp_ppp_get_option('enable_paypal', CP_PPP_DEFAULT_ENABLE_PAYPAL),
|
50 |
-
'paypal_notiemails' => cp_ppp_get_option('paypal_notiemails', '0'),
|
51 |
-
'paypal_email' => cp_ppp_get_option('paypal_email', CP_PPP_DEFAULT_PAYPAL_EMAIL),
|
52 |
-
'request_cost' => cp_ppp_get_option('request_cost', CP_PPP_DEFAULT_COST),
|
53 |
-
'paypal_product_name' => cp_ppp_get_option('paypal_product_name', CP_PPP_DEFAULT_PRODUCT_NAME),
|
54 |
-
'currency' => cp_ppp_get_option('currency', CP_PPP_DEFAULT_CURRENCY),
|
55 |
-
'paypal_language' => cp_ppp_get_option('paypal_language', CP_PPP_DEFAULT_PAYPAL_LANGUAGE),
|
56 |
-
|
57 |
-
'cv_enable_captcha' => cp_ppp_get_option('cv_enable_captcha', CP_PPP_DEFAULT_cv_enable_captcha),
|
58 |
-
'cv_width' => cp_ppp_get_option('cv_width', CP_PPP_DEFAULT_cv_width),
|
59 |
-
'cv_height' => cp_ppp_get_option('cv_height', CP_PPP_DEFAULT_cv_height),
|
60 |
-
'cv_chars' => cp_ppp_get_option('cv_chars', CP_PPP_DEFAULT_cv_chars),
|
61 |
-
'cv_font' => cp_ppp_get_option('cv_font', CP_PPP_DEFAULT_cv_font),
|
62 |
-
'cv_min_font_size' => cp_ppp_get_option('cv_min_font_size', CP_PPP_DEFAULT_cv_min_font_size),
|
63 |
-
'cv_max_font_size' => cp_ppp_get_option('cv_max_font_size', CP_PPP_DEFAULT_cv_max_font_size),
|
64 |
-
'cv_noise' => cp_ppp_get_option('cv_noise', CP_PPP_DEFAULT_cv_noise),
|
65 |
-
'cv_noise_length' => cp_ppp_get_option('cv_noise_length', CP_PPP_DEFAULT_cv_noise_length),
|
66 |
-
'cv_background' => cp_ppp_get_option('cv_background', CP_PPP_DEFAULT_cv_background),
|
67 |
-
'cv_border' => cp_ppp_get_option('cv_border', CP_PPP_DEFAULT_cv_border),
|
68 |
-
'cv_text_enter_valid_captcha' => cp_ppp_get_option('cv_text_enter_valid_captcha', CP_PPP_DEFAULT_cv_text_enter_valid_captcha)
|
69 |
-
)
|
70 |
-
);
|
71 |
-
|
72 |
-
$message = "Item added";
|
73 |
-
}
|
74 |
-
else if (isset($_GET['u']) && $_GET['u'] != '' && $current_user_access)
|
75 |
-
{
|
76 |
-
$wpdb->query( $wpdb->prepare (
|
77 |
-
'UPDATE `'.$wpdb->prefix.CP_PPP_FORMS_TABLE.'` SET form_name=%s WHERE id=%d',
|
78 |
-
$_GET["name"], $_GET['u']
|
79 |
-
)
|
80 |
-
);
|
81 |
-
$message = "Item updated";
|
82 |
-
}
|
83 |
-
else if (isset($_GET['d']) && $_GET['d'] != '' && $current_user_access)
|
84 |
-
{
|
85 |
-
$wpdb->query( $wpdb->prepare ( 'DELETE FROM `'.$wpdb->prefix.CP_PPP_FORMS_TABLE.'` WHERE id=%d', $_GET['d']) );
|
86 |
-
$message = "Item deleted";
|
87 |
-
}
|
88 |
-
else if (isset($_GET['c']) && $_GET['c'] != '' && $current_user_access)
|
89 |
-
{
|
90 |
-
$myrows = $wpdb->get_row( $wpdb->prepare ("SELECT * FROM ".$wpdb->prefix.CP_PPP_FORMS_TABLE." WHERE id=%d", $_GET['c']), ARRAY_A);
|
91 |
-
unset($myrows["id"]);
|
92 |
-
$myrows["form_name"] = 'Cloned: '.$myrows["form_name"];
|
93 |
-
$wpdb->insert( $wpdb->prefix.CP_PPP_FORMS_TABLE, $myrows);
|
94 |
-
$message = "Item duplicated/cloned";
|
95 |
-
}
|
96 |
-
else if (isset($_GET['ac']) && $_GET['ac'] == 'st' && $current_user_access)
|
97 |
-
{
|
98 |
-
update_option( 'CP_CFPP_LOAD_SCRIPTS', ($_GET["scr"]=="1"?"0":"1") );
|
99 |
-
update_option( 'CP_CFPP_LOAD_SCRIPTS_ADMIN', ($_GET["scradmin"]=="1"?"0":"1") );
|
100 |
-
if ($_GET["chs"] != '')
|
101 |
-
{
|
102 |
-
$target_charset = esc_sql($_GET["chs"]);
|
103 |
-
$tables = array( $wpdb->prefix.CP_PPP_POSTS_TABLE_NAME_NO_PREFIX, $wpdb->prefix.CP_PPP_FORMS_TABLE );
|
104 |
-
foreach ($tables as $tab)
|
105 |
-
{
|
106 |
-
$myrows = $wpdb->get_results( "DESCRIBE {$tab}" );
|
107 |
-
foreach ($myrows as $item)
|
108 |
-
{
|
109 |
-
$name = $item->Field;
|
110 |
-
$type = $item->Type;
|
111 |
-
if (preg_match("/^varchar\((\d+)\)$/i", $type, $mat) || !strcasecmp($type, "CHAR") || !strcasecmp($type, "TEXT") || !strcasecmp($type, "MEDIUMTEXT"))
|
112 |
-
{
|
113 |
-
$wpdb->query("ALTER TABLE {$tab} CHANGE {$name} {$name} {$type} COLLATE {$target_charset}");
|
114 |
-
}
|
115 |
-
}
|
116 |
-
}
|
117 |
-
}
|
118 |
-
$message = "Troubleshoot settings updated";
|
119 |
-
}
|
120 |
-
|
121 |
-
|
122 |
-
if ($message) echo "<div id='setting-error-settings_updated' class='updated settings-error'><p><strong>".$message."</strong></p></div>";
|
123 |
-
|
124 |
-
?>
|
125 |
-
<div class="wrap">
|
126 |
-
<h2>Payment Form for PayPal Pro</h2>
|
127 |
-
|
128 |
-
<script type="text/javascript">
|
129 |
-
function cp_addItem()
|
130 |
-
{
|
131 |
-
var calname = document.getElementById("cp_itemname").value;
|
132 |
-
document.location = 'options-general.php?page=cp_ppp&a=1&r='+Math.random()+'&name='+encodeURIComponent(calname);
|
133 |
-
}
|
134 |
-
|
135 |
-
function cp_updateItem(id)
|
136 |
-
{
|
137 |
-
var calname = document.getElementById("calname_"+id).value;
|
138 |
-
document.location = 'options-general.php?page=cp_ppp&u='+id+'&r='+Math.random()+'&name='+encodeURIComponent(calname);
|
139 |
-
}
|
140 |
-
|
141 |
-
function cp_cloneItem(id)
|
142 |
-
{
|
143 |
-
document.location = 'options-general.php?page=cp_ppp&c='+id+'&r='+Math.random();
|
144 |
-
}
|
145 |
-
|
146 |
-
function cp_manageSettings(id)
|
147 |
-
{
|
148 |
-
document.location = 'options-general.php?page=cp_ppp&cal='+id+'&r='+Math.random();
|
149 |
-
}
|
150 |
-
|
151 |
-
function cp_viewMessages(id)
|
152 |
-
{
|
153 |
-
document.location = 'admin.php?page=cp_ppp&cal='+id+'&list=1&r='+Math.random();
|
154 |
-
}
|
155 |
-
|
156 |
-
function cp_deleteItem(id)
|
157 |
-
{
|
158 |
-
if (confirm('Are you sure that you want to delete this item?'))
|
159 |
-
{
|
160 |
-
document.location = 'options-general.php?page=cp_ppp&d='+id+'&r='+Math.random();
|
161 |
-
}
|
162 |
-
}
|
163 |
-
|
164 |
-
function cp_updateConfig()
|
165 |
-
{
|
166 |
-
if (confirm('Are you sure that you want to update these settings?'))
|
167 |
-
{
|
168 |
-
var scr = document.getElementById("ccscriptload").value;
|
169 |
-
var scradmin = document.getElementById("ccscriptloadadmin").value;
|
170 |
-
var chs = document.getElementById("cccharsets").value;
|
171 |
-
document.location = 'options-general.php?page=cp_ppp&ac=st&scr='+scr+'&scradmin='+scradmin+'&chs='+chs+'&r='+Math.random();
|
172 |
-
}
|
173 |
-
}
|
174 |
-
|
175 |
-
</script>
|
176 |
-
|
177 |
-
|
178 |
-
<div id="normal-sortables" class="meta-box-sortables">
|
179 |
-
|
180 |
-
|
181 |
-
<div id="metabox_basic_settings" class="postbox" >
|
182 |
-
<h3 class='hndle' style="padding:5px;"><span>Form List / Items List</span></h3>
|
183 |
-
<div class="inside">
|
184 |
-
|
185 |
-
|
186 |
-
<table cellspacing="10">
|
187 |
-
<tr>
|
188 |
-
<th align="left">ID</th><th align="left">Form Name</th><th align="left"> Options</th><?php if ($current_user_access) { ?> <th align="left">Shorttag for Pages and Posts</th> <?php } ?>
|
189 |
-
</tr>
|
190 |
-
<?php
|
191 |
-
|
192 |
-
$current_user = wp_get_current_user();
|
193 |
-
$myrows = $wpdb->get_results( "SELECT * FROM ".$wpdb->prefix.CP_PPP_FORMS_TABLE );
|
194 |
-
foreach ($myrows as $item)
|
195 |
-
if ($current_user_access || @in_array($current_user->ID, unserialize($item->cp_user_access)))
|
196 |
-
{
|
197 |
-
?>
|
198 |
-
<tr>
|
199 |
-
<td nowrap><?php echo $item->id; ?></td>
|
200 |
-
<td nowrap><input type="text" name="calname_<?php echo $item->id; ?>" id="calname_<?php echo $item->id; ?>" value="<?php echo esc_attr($item->form_name); ?>" /></td>
|
201 |
-
|
202 |
-
<td nowrap>
|
203 |
-
<?php if ($current_user_access) { ?>
|
204 |
-
<input type="button" name="calupdate_<?php echo $item->id; ?>" value="Update" onclick="cp_updateItem(<?php echo $item->id; ?>);" />
|
205 |
-
<input type="button" name="calmanage_<?php echo $item->id; ?>" value="Settings" onclick="cp_manageSettings(<?php echo $item->id; ?>);" />
|
206 |
-
<?php } ?>
|
207 |
-
<input type="button" name="calmanage_<?php echo $item->id; ?>" value="Messages" onclick="cp_viewMessages(<?php echo $item->id; ?>);" />
|
208 |
-
<?php if ($current_user_access) { ?>
|
209 |
-
<input type="button" name="calclone_<?php echo $item->id; ?>" value="Clone" onclick="cp_cloneItem(<?php echo $item->id; ?>);" />
|
210 |
-
<input type="button" name="caldelete_<?php echo $item->id; ?>" value="Delete" onclick="cp_deleteItem(<?php echo $item->id; ?>);" />
|
211 |
-
<?php } ?>
|
212 |
-
</td>
|
213 |
-
<?php if ($current_user_access) { ?> <td nowrap>[CP_PPP id="<?php echo $item->id; ?>"]</td> <?php } ?>
|
214 |
-
</tr>
|
215 |
-
<?php
|
216 |
-
}
|
217 |
-
?>
|
218 |
-
|
219 |
-
</table>
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
</div>
|
224 |
-
</div>
|
225 |
-
|
226 |
-
<?php if ($current_user_access) { ?>
|
227 |
-
|
228 |
-
<div id="metabox_basic_settings" class="postbox" >
|
229 |
-
<h3 class='hndle' style="padding:5px;"><span>New Form</span></h3>
|
230 |
-
<div class="inside">
|
231 |
-
|
232 |
-
<form name="additem">
|
233 |
-
Item Name:<br />
|
234 |
-
<input type="text" name="cp_itemname" id="cp_itemname" value="" /> <input type="button" onclick="cp_addItem();" name="gobtn" value="Add" />
|
235 |
-
<br /><br />
|
236 |
-
</form>
|
237 |
-
|
238 |
-
</div>
|
239 |
-
</div>
|
240 |
-
|
241 |
-
|
242 |
-
<div id="metabox_basic_settings" class="postbox" >
|
243 |
-
<h3 class='hndle' style="padding:5px;"><span>Troubleshoot Area</span></h3>
|
244 |
-
<div class="inside">
|
245 |
-
<p><strong>Important!</strong>: Use this area <strong>only</strong> if you are experiencing conflicts with third party plugins, with the theme scripts or with the character encoding.</p>
|
246 |
-
<form name="updatesettings">
|
247 |
-
Script load method for public website:<br />
|
248 |
-
<select id="ccscriptload" name="ccscriptload">
|
249 |
-
<option value="0" <?php if (get_option('CP_CFPP_LOAD_SCRIPTS',"1") == "1") echo 'selected'; ?>>Classic (Recommended)</option>
|
250 |
-
<option value="1" <?php if (get_option('CP_CFPP_LOAD_SCRIPTS',"1") != "1") echo 'selected'; ?>>Direct</option>
|
251 |
-
</select><br />
|
252 |
-
<em>* Change the script load method if the form doesn't appear in the public website.</em>
|
253 |
-
<br /><br />
|
254 |
-
<div style="display:none">
|
255 |
-
Script load method for admin area:<br />
|
256 |
-
<select id="ccscriptloadadmin" name="ccscriptloadadmin">
|
257 |
-
<option value="0" <?php if (get_option('CP_CFPP_LOAD_SCRIPTS_ADMIN',"1") == "1") echo 'selected'; ?>>Classic (Recommended)</option>
|
258 |
-
<option value="1" <?php if (get_option('CP_CFPP_LOAD_SCRIPTS_ADMIN',"1") != "1") echo 'selected'; ?>>Direct</option>
|
259 |
-
</select><br />
|
260 |
-
<em>* Change the script load method if the form builder doesn't appear in the admin/settings area.</em>
|
261 |
-
<br /><br />
|
262 |
-
</div>
|
263 |
-
|
264 |
-
Character encoding:<br />
|
265 |
-
<select id="cccharsets" name="cccharsets">
|
266 |
-
<option value="">Keep current charset (Recommended)</option>
|
267 |
-
<option value="utf8_general_ci">UTF-8 (try this first)</option>
|
268 |
-
<option value="latin1_swedish_ci">latin1_swedish_ci</option>
|
269 |
-
</select><br />
|
270 |
-
<em>* Update the charset if you are getting problems displaying special/non-latin characters. After updated you need to edit the special characters again.</em>
|
271 |
-
<br />
|
272 |
-
<input type="button" onclick="cp_updateConfig();" name="gobtn" value="UPDATE" />
|
273 |
-
<br /><br />
|
274 |
-
</form>
|
275 |
-
|
276 |
-
</div>
|
277 |
-
</div>
|
278 |
-
|
279 |
-
<?php } ?>
|
280 |
-
|
281 |
-
</div>
|
282 |
-
|
283 |
-
|
284 |
-
[<a href="http://wordpress.dwbooster.com/contact-us" target="_blank">Request Custom Modifications</a>] | [<a href="http://wordpress.dwbooster.com/forms/cp-contact-form-with-paypal" target="_blank">Help</a>]
|
285 |
-
</form>
|
286 |
-
</div>
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
cp_ppp_admin_int_message_list.inc.php
DELETED
@@ -1,230 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
if ( !is_admin() )
|
4 |
-
{
|
5 |
-
echo 'Direct access not allowed.';
|
6 |
-
exit;
|
7 |
-
}
|
8 |
-
|
9 |
-
if (!defined('CP_PPP_ID'))
|
10 |
-
define ('CP_PPP_ID',intval($_GET["cal"]));
|
11 |
-
|
12 |
-
global $wpdb;
|
13 |
-
|
14 |
-
|
15 |
-
$current_user = wp_get_current_user();
|
16 |
-
$current_user_access = current_user_can('manage_options');
|
17 |
-
|
18 |
-
$message = "";
|
19 |
-
|
20 |
-
if (isset($_GET['lu']) && $_GET['lu'] != '')
|
21 |
-
{
|
22 |
-
$wpdb->query( $wpdb->prepare (
|
23 |
-
'UPDATE `'.CP_PPP_POSTS_TABLE_NAME.'` SET paid=%s WHERE id=%d',
|
24 |
-
$_GET["status"], intval($_GET['lu'])
|
25 |
-
)
|
26 |
-
);
|
27 |
-
$message = "Item updated";
|
28 |
-
}
|
29 |
-
else if (isset($_GET['ld']) && $_GET['ld'] != '')
|
30 |
-
{
|
31 |
-
$wpdb->query( $wpdb->prepare ( 'DELETE FROM `'.CP_PPP_POSTS_TABLE_NAME.'` WHERE id=%d', intval($_GET['ld'])) );
|
32 |
-
$message = "Item deleted";
|
33 |
-
}
|
34 |
-
|
35 |
-
if (CP_PPP_ID != 0) {
|
36 |
-
$myform = $wpdb->get_results( $wpdb->prepare ('SELECT * FROM '.$wpdb->prefix.CP_PPP_FORMS_TABLE .' WHERE id=%d', CP_PPP_ID) );
|
37 |
-
if (!$current_user_access && !@in_array($current_user->ID, unserialize($myform[0]->cp_user_access)))
|
38 |
-
{
|
39 |
-
echo 'Current user permissions don\'t have access to this messages list.';
|
40 |
-
exit;
|
41 |
-
}
|
42 |
-
}
|
43 |
-
|
44 |
-
|
45 |
-
$current_page = intval($_GET["p"]);
|
46 |
-
if (!$current_page) $current_page = 1;
|
47 |
-
$records_per_page = 50;
|
48 |
-
|
49 |
-
$cond = '';
|
50 |
-
if ($_GET["search"] != '') $cond .= " AND (data like '%".esc_sql($_GET["search"])."%' OR paypal_post LIKE '%".esc_sql($_GET["search"])."%')";
|
51 |
-
if ($_GET["dfrom"] != '') $cond .= " AND (`time` >= '".esc_sql($_GET["dfrom"])."')";
|
52 |
-
if ($_GET["dto"] != '') $cond .= " AND (`time` <= '".esc_sql($_GET["dto"])." 23:59:59')";
|
53 |
-
if (CP_PPP_ID != 0) $cond .= " AND formid=".CP_PPP_ID;
|
54 |
-
|
55 |
-
if (!$current_user_access && CP_PPP_ID == 0)
|
56 |
-
{
|
57 |
-
echo 'Current user permissions don\'t have access to this messages list.';
|
58 |
-
exit;
|
59 |
-
}
|
60 |
-
|
61 |
-
$events = $wpdb->get_results( "SELECT * FROM ".CP_PPP_POSTS_TABLE_NAME." WHERE 1=1 ".$cond." ORDER BY `time` DESC" );
|
62 |
-
$total_pages = ceil(count($events) / $records_per_page);
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
if ($message) echo "<div id='setting-error-settings_updated' class='updated settings-error'><p><strong>".$message."</strong></p></div>";
|
67 |
-
|
68 |
-
|
69 |
-
?>
|
70 |
-
<script type="text/javascript">
|
71 |
-
function cp_updateMessageItem(id,status)
|
72 |
-
{
|
73 |
-
document.location = 'admin.php?page=cp_ppp&cal=<?php echo CP_PPP_ID; ?>&list=1&status='+status+'&lu='+id+'&r='+Math.random( );
|
74 |
-
}
|
75 |
-
function cp_deleteMessageItem(id)
|
76 |
-
{
|
77 |
-
if (confirm('Are you sure that you want to delete this item?'))
|
78 |
-
{
|
79 |
-
document.location = 'admin.php?page=cp_ppp&cal=<?php echo CP_PPP_ID; ?>&list=1&ld='+id+'&r='+Math.random();
|
80 |
-
}
|
81 |
-
}
|
82 |
-
</script>
|
83 |
-
<div class="wrap">
|
84 |
-
<h2>Payment Form for PayPal Pro - Message List</h2>
|
85 |
-
|
86 |
-
<input type="button" name="backbtn" value="Back to items list..." onclick="document.location='admin.php?page=cp_ppp';">
|
87 |
-
|
88 |
-
|
89 |
-
<div id="normal-sortables" class="meta-box-sortables">
|
90 |
-
<hr />
|
91 |
-
<h3>This message list is from: <?php if (CP_PPP_ID != 0) echo $myform[0]->form_name; else echo 'All forms'; ?></h3>
|
92 |
-
</div>
|
93 |
-
|
94 |
-
|
95 |
-
<form action="admin.php" method="get">
|
96 |
-
<input type="hidden" name="page" value="cp_ppp" />
|
97 |
-
<input type="hidden" name="cal" value="<?php echo CP_PPP_ID; ?>" />
|
98 |
-
<input type="hidden" name="list" value="1" />
|
99 |
-
<nobr>Search for: <input type="text" name="search" value="<?php echo esc_attr($_GET["search"]); ?>" /> </nobr>
|
100 |
-
<nobr>From: <input type="text" id="dfrom" name="dfrom" value="<?php echo esc_attr($_GET["dfrom"]); ?>" /> </nobr>
|
101 |
-
<nobr>To: <input type="text" id="dto" name="dto" value="<?php echo esc_attr($_GET["dto"]); ?>" /> </nobr>
|
102 |
-
<nobr>Item: <select id="cal" name="cal">
|
103 |
-
<?php if ($current_user_access) { ?><option value="0">[All Items]</option><?php } ?>
|
104 |
-
<?php
|
105 |
-
$myrows = $wpdb->get_results( "SELECT * FROM ".$wpdb->prefix.CP_PPP_FORMS_TABLE );
|
106 |
-
foreach ($myrows as $item)
|
107 |
-
if ($current_user_access || @in_array($current_user->ID, unserialize($item->cp_user_access)))
|
108 |
-
echo '<option value="'.$item->id.'"'.(intval($item->id)==intval(CP_PPP_ID)?" selected":"").'>'.$item->form_name.'</option>';
|
109 |
-
?>
|
110 |
-
</select></nobr>
|
111 |
-
<nobr><span class="submit"><input type="submit" name="ds" value="Filter" /></span>
|
112 |
-
<span class="submit"><input type="submit" name="cp_ppp_csv" value="Export to CSV" /></span></nobr>
|
113 |
-
</form>
|
114 |
-
|
115 |
-
<br />
|
116 |
-
|
117 |
-
<?php
|
118 |
-
|
119 |
-
|
120 |
-
echo paginate_links( array(
|
121 |
-
'base' => 'admin.php?page=cp_ppp&cal='.CP_PPP_ID.'&list=1%_%&dfrom='.urlencode($_GET["dfrom"]).'&dto='.urlencode($_GET["dto"]).'&search='.urlencode($_GET["search"]),
|
122 |
-
'format' => '&p=%#%',
|
123 |
-
'total' => $total_pages,
|
124 |
-
'current' => $current_page,
|
125 |
-
'show_all' => False,
|
126 |
-
'end_size' => 1,
|
127 |
-
'mid_size' => 2,
|
128 |
-
'prev_next' => True,
|
129 |
-
'prev_text' => __('« Previous'),
|
130 |
-
'next_text' => __('Next »'),
|
131 |
-
'type' => 'plain',
|
132 |
-
'add_args' => False
|
133 |
-
) );
|
134 |
-
|
135 |
-
?>
|
136 |
-
|
137 |
-
<div id="dex_printable_contents">
|
138 |
-
<table class="wp-list-table widefat fixed pages" cellspacing="0">
|
139 |
-
<thead>
|
140 |
-
<tr>
|
141 |
-
<th style="padding-left:7px;font-weight:bold;" width="50" nowrap>ID</th>
|
142 |
-
<th style="padding-left:7px;font-weight:bold;" width="125">Date</th>
|
143 |
-
<th style="padding-left:7px;font-weight:bold;">Email</th>
|
144 |
-
<th style="padding-left:7px;font-weight:bold;">Message</th>
|
145 |
-
<th style="padding-left:7px;font-weight:bold;">Payment Info</th>
|
146 |
-
<th style="padding-left:7px;font-weight:bold;">Options</th>
|
147 |
-
</tr>
|
148 |
-
</thead>
|
149 |
-
<tbody id="the-list">
|
150 |
-
<?php for ($i=($current_page-1)*$records_per_page; $i<$current_page*$records_per_page; $i++) if (isset($events[$i])) { ?>
|
151 |
-
<tr class='<?php if (!($i%2)) { ?>alternate <?php } ?>author-self status-draft format-default iedit' valign="top">
|
152 |
-
<td><?php echo $events[$i]->id; ?></td>
|
153 |
-
<td><?php echo substr($events[$i]->time,0,16); ?></td>
|
154 |
-
<td><?php echo $events[$i]->notifyto; ?></td>
|
155 |
-
<td><?php
|
156 |
-
$data = $events[$i]->data;
|
157 |
-
$posted_data = unserialize($events[$i]->posted_data);
|
158 |
-
foreach ($posted_data as $item => $value)
|
159 |
-
if (strpos($item,"_url") && is_array($value))
|
160 |
-
{
|
161 |
-
$data = str_replace ($posted_data[str_replace("_url","",$item)],'<a href="'.$value[0].'" target="_blank">'.$posted_data[str_replace("_url","",$item)].'</a><br />',$data);
|
162 |
-
}
|
163 |
-
echo str_replace("\n","<br />",$data);
|
164 |
-
|
165 |
-
?></td>
|
166 |
-
<td>
|
167 |
-
<?php
|
168 |
-
if ($events[$i]->paid) {
|
169 |
-
echo '<span style="color:#00aa00;font-weight:bold">'.__("Paid").'</span><hr />';
|
170 |
-
if (substr($events[$i]->paypal_post,0,2) != 'a:') echo str_replace("\n","<br />",$events[$i]->paypal_post);
|
171 |
-
}
|
172 |
-
else
|
173 |
-
echo '<span style="color:#ff0000;font-weight:bold">'.__("Not Paid").'</span>';
|
174 |
-
?>
|
175 |
-
|
176 |
-
</td>
|
177 |
-
<td>
|
178 |
-
<?php if ($events[$i]->paid) { ?>
|
179 |
-
<input type="button" name="calmanage_<?php echo $events[$i]->id; ?>" value="Change status to NOT PAID" onclick="cp_updateMessageItem(<?php echo $events[$i]->id; ?>,0);" />
|
180 |
-
<?php } else { ?>
|
181 |
-
<input type="button" name="calmanage_<?php echo $events[$i]->id; ?>" value="Change status to PAID" onclick="cp_updateMessageItem(<?php echo $events[$i]->id; ?>,1);" />
|
182 |
-
<?php } ?>
|
183 |
-
|
184 |
-
<input type="button" name="caldelete_<?php echo $events[$i]->id; ?>" value="Delete" onclick="cp_deleteMessageItem(<?php echo $events[$i]->id; ?>);" />
|
185 |
-
</td>
|
186 |
-
</tr>
|
187 |
-
<?php } ?>
|
188 |
-
</tbody>
|
189 |
-
</table>
|
190 |
-
</div>
|
191 |
-
|
192 |
-
<p class="submit"><input type="button" name="pbutton" value="Print" onclick="do_dexapp_print();" /></p>
|
193 |
-
|
194 |
-
</div>
|
195 |
-
|
196 |
-
|
197 |
-
<script type="text/javascript">
|
198 |
-
function do_dexapp_print()
|
199 |
-
{
|
200 |
-
w=window.open();
|
201 |
-
w.document.write("<style>table{border:2px solid black;width:100%;}th{border-bottom:2px solid black;text-align:left}td{padding-left:10px;border-bottom:1px solid black;}</style>"+document.getElementById('dex_printable_contents').innerHTML);
|
202 |
-
w.print();
|
203 |
-
w.close();
|
204 |
-
}
|
205 |
-
|
206 |
-
var $j = jQuery.noConflict();
|
207 |
-
$j(function() {
|
208 |
-
$j("#dfrom").datepicker({
|
209 |
-
dateFormat: 'yy-mm-dd'
|
210 |
-
});
|
211 |
-
$j("#dto").datepicker({
|
212 |
-
dateFormat: 'yy-mm-dd'
|
213 |
-
});
|
214 |
-
});
|
215 |
-
|
216 |
-
</script>
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
cp_ppp_data_source.inc.php
DELETED
@@ -1,342 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
add_action( 'init', 'cp_ppp_init_ds', 0 );
|
4 |
-
|
5 |
-
function cp_ppp_init_ds()
|
6 |
-
{
|
7 |
-
if( isset( $_REQUEST[ 'cffaction' ] ) )
|
8 |
-
{
|
9 |
-
switch( $_REQUEST[ 'cffaction' ] )
|
10 |
-
{
|
11 |
-
case 'test_db_connection':
|
12 |
-
global $cpcff_db_connect;
|
13 |
-
|
14 |
-
$_REQUEST[ 'data_source' ] = 'database';
|
15 |
-
$_REQUEST[ 'query' ] = 'SHOW tables';
|
16 |
-
$result = cp_ppp_ds( $_REQUEST );
|
17 |
-
$err = mysqli_error( $cpcff_db_connect );
|
18 |
-
if( !is_null( mysqli_connect_error() ) ) $err .= mysqli_connect_error();
|
19 |
-
print( ( ( empty( $err ) ) ? 'Connection OK' : $err ) );
|
20 |
-
exit;
|
21 |
-
break;
|
22 |
-
case 'test_db_query':
|
23 |
-
if( $_REQUEST[ 'active' ] == 'structure' )
|
24 |
-
{
|
25 |
-
_cp_ppp_check_for_variable( $_REQUEST[ 'table' ] );
|
26 |
-
_cp_ppp_check_for_variable( $_REQUEST[ 'where' ] );
|
27 |
-
}
|
28 |
-
else
|
29 |
-
{
|
30 |
-
_cp_ppp_check_for_variable( $_REQUEST[ 'query' ] );
|
31 |
-
}
|
32 |
-
case 'get_data_from_database':
|
33 |
-
global $cpcff_db_connect;
|
34 |
-
|
35 |
-
$_REQUEST[ 'data_source' ] = 'database';
|
36 |
-
if( $_REQUEST[ 'active' ] == 'structure' )
|
37 |
-
{
|
38 |
-
$_REQUEST[ 'query' ] = '';
|
39 |
-
}
|
40 |
-
|
41 |
-
$query_result = cp_ppp_ds( $_REQUEST );
|
42 |
-
$err = mysqli_error( $cpcff_db_connect );
|
43 |
-
if( !is_null( mysqli_connect_error() ) ) $err .= mysqli_connect_error();
|
44 |
-
if( $_REQUEST[ 'cffaction' ] == test_db_query )
|
45 |
-
{
|
46 |
-
print_r( ( ( empty( $err ) ) ? $query_result : $err ) );
|
47 |
-
}
|
48 |
-
else
|
49 |
-
{
|
50 |
-
$result_obj = new stdClass;
|
51 |
-
if( !empty( $err ) )
|
52 |
-
{
|
53 |
-
$result_obj->error = $err;
|
54 |
-
}
|
55 |
-
else
|
56 |
-
{
|
57 |
-
$result_obj->data = $query_result;
|
58 |
-
}
|
59 |
-
print( json_encode( $result_obj ) );
|
60 |
-
}
|
61 |
-
exit;
|
62 |
-
break;
|
63 |
-
case 'get_post_types':
|
64 |
-
print json_encode( get_post_types( array('public' => true) ) );
|
65 |
-
exit;
|
66 |
-
break;
|
67 |
-
case 'get_posts':
|
68 |
-
$_REQUEST[ 'data_source' ] = 'post_type';
|
69 |
-
$result_obj = new stdClass;
|
70 |
-
$result_obj->data = cp_ppp_ds( $_REQUEST );
|
71 |
-
print( json_encode( $result_obj ) );
|
72 |
-
exit;
|
73 |
-
break;
|
74 |
-
case 'get_available_taxonomies':
|
75 |
-
print json_encode( get_taxonomies( array('public' => true), 'objects' ) );
|
76 |
-
exit;
|
77 |
-
break;
|
78 |
-
case 'get_taxonomies':
|
79 |
-
$_REQUEST[ 'data_source' ] = 'taxonomy';
|
80 |
-
$result_obj = new stdClass;
|
81 |
-
$result_obj->data = cp_ppp_ds( $_REQUEST );
|
82 |
-
print( json_encode( $result_obj ) );
|
83 |
-
exit;
|
84 |
-
break;
|
85 |
-
case 'get_users':
|
86 |
-
$_REQUEST[ 'data_source' ] = 'user';
|
87 |
-
$result_obj = new stdClass;
|
88 |
-
$result_obj->data = cp_ppp_ds( $_REQUEST );
|
89 |
-
print( json_encode( $result_obj ) );
|
90 |
-
exit;
|
91 |
-
break;
|
92 |
-
}
|
93 |
-
}
|
94 |
-
|
95 |
-
} // End cp_ppp_init_ds
|
96 |
-
|
97 |
-
function cp_ppp_ds( $data )
|
98 |
-
{
|
99 |
-
switch( $data[ 'data_source' ] )
|
100 |
-
{
|
101 |
-
case 'database':
|
102 |
-
return cp_ppp_ds_db( $data );
|
103 |
-
break;
|
104 |
-
case 'csv':
|
105 |
-
return cp_ppp_ds_csv( $data );
|
106 |
-
break;
|
107 |
-
case 'post_type':
|
108 |
-
return cp_ppp_ds_post_type( $data );
|
109 |
-
break;
|
110 |
-
case 'taxonomy':
|
111 |
-
return cp_ppp_ds_taxonomy( $data );
|
112 |
-
break;
|
113 |
-
case 'user':
|
114 |
-
return cp_ppp_ds_user( $data );
|
115 |
-
break;
|
116 |
-
}
|
117 |
-
}
|
118 |
-
|
119 |
-
/**
|
120 |
-
Displays a text about the existence of variables in the query, and stops the script execution.
|
121 |
-
**/
|
122 |
-
function _cp_ppp_check_for_variable( $str )
|
123 |
-
{
|
124 |
-
if( preg_match( '/<%fieldname\d+%>/', $str ) )
|
125 |
-
{
|
126 |
-
print 'Your query includes variables, so it cannot be tested from the form\'s edition';
|
127 |
-
exit;
|
128 |
-
}
|
129 |
-
}
|
130 |
-
function _cp_ppp_set_attr( &$obj, $attr, $arr, $elem )
|
131 |
-
{
|
132 |
-
$arr = (array)$arr;
|
133 |
-
if( !empty( $elem ) && !empty( $arr[ $elem ] ) )
|
134 |
-
{
|
135 |
-
$tmp = (array)$obj;
|
136 |
-
$tmp[ $attr ] = $arr[ $elem ];
|
137 |
-
$obj = (object)$tmp;
|
138 |
-
}
|
139 |
-
}
|
140 |
-
|
141 |
-
function cp_ppp_ds_db( $data )
|
142 |
-
{
|
143 |
-
global $wpdb, $cpcff_db_connect;
|
144 |
-
|
145 |
-
if( !empty( $data[ 'query' ] ) )
|
146 |
-
{
|
147 |
-
$query = $data[ 'query' ];
|
148 |
-
}
|
149 |
-
else
|
150 |
-
{
|
151 |
-
$separator = '';
|
152 |
-
$select = '';
|
153 |
-
if( !empty( $data[ 'value' ] ) )
|
154 |
-
{
|
155 |
-
$separator = ',';
|
156 |
-
$select .= $data[ 'value' ] . ' AS value';
|
157 |
-
}
|
158 |
-
|
159 |
-
if( !empty( $data[ 'text' ] ) )
|
160 |
-
{
|
161 |
-
$select .= $separator . $data[ 'text' ] . ' AS text';
|
162 |
-
}
|
163 |
-
|
164 |
-
$query = 'SELECT DISTINCT ' . $select . ' FROM ' . $data[ 'table' ] . ( ( !empty( $data[ 'where' ] ) ) ? ' WHERE ' . $data[ 'where' ] : '' ) . ( ( !empty( $data[ 'orderby' ] ) ) ? ' ORDER BY ' . $data[ 'orderby' ] : '' ).( ( !empty( $data[ 'limit' ] ) ) ? ' LIMIT ' . $data[ 'limit' ] : '' );
|
165 |
-
|
166 |
-
}
|
167 |
-
$query = stripcslashes( $query );
|
168 |
-
|
169 |
-
if( !empty( $data[ 'connection' ] ) && !empty( $data[ 'form' ] ) )
|
170 |
-
{
|
171 |
-
$connection_data = unserialize( mcrypt_decrypt( MCRYPT_RIJNDAEL_256, cp_ppp_get_option( 'form_structure', CP_PPP_DEFAULT_form_structure, $data[ 'form' ] ), base64_decode( $data[ 'connection' ] ), MCRYPT_MODE_ECB ) );
|
172 |
-
foreach( $connection_data as $key => $val )
|
173 |
-
{
|
174 |
-
$data[ $key ] = $val;
|
175 |
-
}
|
176 |
-
}
|
177 |
-
|
178 |
-
if( !empty( $data[ 'host' ] ) ) // External database
|
179 |
-
{
|
180 |
-
$results = array();
|
181 |
-
$cpcff_db_connect = mysqli_connect( $data[ 'host' ], $data[ 'user' ], $data[ 'pass' ], $data[ 'database' ] );
|
182 |
-
|
183 |
-
if( $cpcff_db_connect !== false )
|
184 |
-
{
|
185 |
-
$query_result = mysqli_query( $cpcff_db_connect, $query );
|
186 |
-
while( $query_result && $row = mysqli_fetch_object( $query_result ) )
|
187 |
-
{
|
188 |
-
$results[] = $row;
|
189 |
-
}
|
190 |
-
}
|
191 |
-
return $results;
|
192 |
-
}
|
193 |
-
else // Local database
|
194 |
-
{
|
195 |
-
return $wpdb->get_results( $query, ARRAY_A );
|
196 |
-
}
|
197 |
-
} // End cp_ppp_ds_db
|
198 |
-
|
199 |
-
function cp_ppp_ds_csv( $data )
|
200 |
-
{
|
201 |
-
}
|
202 |
-
|
203 |
-
function cp_ppp_ds_post_type( $data )
|
204 |
-
{
|
205 |
-
|
206 |
-
$posts = array();
|
207 |
-
if( !empty( $data[ 'id' ] ) )
|
208 |
-
{
|
209 |
-
$result = get_post( $data[ 'id' ], ARRAY_A );
|
210 |
-
if( !is_null( $result ) )
|
211 |
-
{
|
212 |
-
$tmp = new stdClass;
|
213 |
-
_cp_ppp_set_attr( $tmp, 'value', $result, $data[ 'value' ] );
|
214 |
-
_cp_ppp_set_attr( $tmp, 'text', $result, $data[ 'text' ] );
|
215 |
-
array_push( $posts, $tmp );
|
216 |
-
}
|
217 |
-
}
|
218 |
-
else
|
219 |
-
{
|
220 |
-
$args = array(
|
221 |
-
'post_status' => 'publish',
|
222 |
-
'orderby' => 'post_date',
|
223 |
-
'order' => 'DESC'
|
224 |
-
);
|
225 |
-
|
226 |
-
if( !empty( $data[ 'posttype' ] ) )
|
227 |
-
{
|
228 |
-
$args[ 'post_type' ] = $data[ 'posttype' ];
|
229 |
-
}
|
230 |
-
|
231 |
-
if( !empty( $data[ 'last' ] ) )
|
232 |
-
{
|
233 |
-
$args[ 'posts_per_page' ] = $data[ 'last' ];
|
234 |
-
}
|
235 |
-
|
236 |
-
$results = get_posts( $args );
|
237 |
-
|
238 |
-
foreach ( $results as $result )
|
239 |
-
{
|
240 |
-
$tmp = new stdClass;
|
241 |
-
_cp_ppp_set_attr( $tmp, 'value', $result, $data[ 'value' ] );
|
242 |
-
_cp_ppp_set_attr( $tmp, 'text', $result, $data[ 'text' ] );
|
243 |
-
array_push( $posts, $tmp );
|
244 |
-
}
|
245 |
-
}
|
246 |
-
return $posts;
|
247 |
-
}
|
248 |
-
|
249 |
-
function cp_ppp_ds_taxonomy( $data )
|
250 |
-
{
|
251 |
-
$taxonomies = array();
|
252 |
-
if( !empty( $data[ 'id' ] ) || !empty( $data[ 'slug' ] ) )
|
253 |
-
{
|
254 |
-
if( !empty( $data[ 'taxonomy' ] ) )
|
255 |
-
{
|
256 |
-
if( !empty( $data[ 'id' ] ) )
|
257 |
-
{
|
258 |
-
$result = get_term( $data[ 'id' ], $data[ 'taxonomy' ], ARRAY_A );
|
259 |
-
}
|
260 |
-
else
|
261 |
-
{
|
262 |
-
$result = get_term_by( 'slug', $data[ 'slug' ], $data[ 'taxonomy' ], ARRAY_A );
|
263 |
-
}
|
264 |
-
|
265 |
-
if( !is_null( $result ) )
|
266 |
-
{
|
267 |
-
$tmp = new stdClass;
|
268 |
-
_cp_ppp_set_attr( $tmp, 'value', $result, $data[ 'value' ] );
|
269 |
-
_cp_ppp_set_attr( $tmp, 'text', $result, $data[ 'text' ] );
|
270 |
-
array_push( $taxonomies, $tmp );
|
271 |
-
}
|
272 |
-
}
|
273 |
-
}
|
274 |
-
else
|
275 |
-
{
|
276 |
-
if( !empty( $data[ 'taxonomy' ] ) )
|
277 |
-
{
|
278 |
-
$results = get_terms( $data[ 'taxonomy' ], array( 'hide_empty' => 0 ) );
|
279 |
-
|
280 |
-
foreach ( $results as $result )
|
281 |
-
{
|
282 |
-
$tmp = new stdClass;
|
283 |
-
_cp_ppp_set_attr( $tmp, 'value', $result, $data[ 'value' ] );
|
284 |
-
_cp_ppp_set_attr( $tmp, 'text', $result, $data[ 'text' ] );
|
285 |
-
array_push( $taxonomies, $tmp );
|
286 |
-
}
|
287 |
-
}
|
288 |
-
}
|
289 |
-
return $taxonomies;
|
290 |
-
}
|
291 |
-
|
292 |
-
|
293 |
-
function cp_ppp_ds_user( $data )
|
294 |
-
{
|
295 |
-
$users = array();
|
296 |
-
if( !empty( $data[ 'logged' ] ) && $data[ 'logged' ] !== 'false' )
|
297 |
-
{
|
298 |
-
$result = wp_get_current_user();
|
299 |
-
if( !empty( $result ) )
|
300 |
-
{
|
301 |
-
$tmp = new stdClass;
|
302 |
-
_cp_ppp_set_attr( $tmp, 'value', $result->data, $data[ 'value' ] );
|
303 |
-
$users[] = $tmp;
|
304 |
-
}
|
305 |
-
}
|
306 |
-
elseif( !empty( $data[ 'id' ] ) || !empty( $data[ 'login' ] ) )
|
307 |
-
{
|
308 |
-
if( !empty( $data[ 'id' ] ) )
|
309 |
-
{
|
310 |
-
$tmp = new stdClass;
|
311 |
-
$result = get_user_by( 'id', $data[ 'id' ] );
|
312 |
-
}
|
313 |
-
else
|
314 |
-
{
|
315 |
-
$tmp = new stdClass;
|
316 |
-
$result = get_user_by( 'login', $data[ 'login' ] );
|
317 |
-
}
|
318 |
-
|
319 |
-
if( !empty( $result ) )
|
320 |
-
{
|
321 |
-
$tmp = new stdClass;
|
322 |
-
_cp_ppp_set_attr( $tmp, 'value', $result->data, $data[ 'value' ] );
|
323 |
-
$users[] = $tmp;
|
324 |
-
}
|
325 |
-
}
|
326 |
-
else
|
327 |
-
{
|
328 |
-
|
329 |
-
$results = get_users();
|
330 |
-
foreach( $results as $result )
|
331 |
-
{
|
332 |
-
$tmp = new stdClass;
|
333 |
-
_cp_ppp_set_attr( $tmp, 'value', $result->data, $data[ 'value' ] );
|
334 |
-
_cp_ppp_set_attr( $tmp, 'text', $result->data, $data[ 'text' ] );
|
335 |
-
$users[] = $tmp;
|
336 |
-
}
|
337 |
-
}
|
338 |
-
|
339 |
-
return $users;
|
340 |
-
}
|
341 |
-
|
342 |
-
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
cp_ppp_paypal_pro_int.inc.php
DELETED
@@ -1,379 +0,0 @@
|
|
1 |
-
<br />
|
2 |
-
<table cellpadding="0" cellspacing="0" style="margin:0px;border:0px;width:100%;">
|
3 |
-
<tr style="border:0px;">
|
4 |
-
<td style="padding:0px;border:0px;">
|
5 |
-
<div class="fields" id="field-c0-ppp">
|
6 |
-
<label>First Name:</label>
|
7 |
-
<div class="dfield">
|
8 |
-
<input type="text" size="15" name="cfpp_customer_first_name" id="cfpp_customer_first_name" value="" />
|
9 |
-
</div>
|
10 |
-
<div class="clearer"></div>
|
11 |
-
</div><div class="dfield">
|
12 |
-
</td>
|
13 |
-
<td style="border:0px;">
|
14 |
-
<div class="fields" id="field-c0-ppp">
|
15 |
-
<label>Last Name:</label>
|
16 |
-
<div class="dfield">
|
17 |
-
<input type="text" size="15" name="cfpp_customer_last_name" id="cfpp_customer_last_name" value="" />
|
18 |
-
</div>
|
19 |
-
<div class="clearer"></div>
|
20 |
-
</div>
|
21 |
-
</td>
|
22 |
-
</tr>
|
23 |
-
</table>
|
24 |
-
<table cellpadding="0" cellspacing="0" style="margin:0px;border:0px;width:100%;">
|
25 |
-
<tr>
|
26 |
-
<td style="padding:0px; border:0px;" nowrap>
|
27 |
-
<div class="fields" id="field-c0-ppp">
|
28 |
-
<label>Credit Card Number:</label>
|
29 |
-
<div class="dfield">
|
30 |
-
<input type="text" size="18" name="cfpp_customer_credit_card_number" id="cfpp_customer_credit_card_number" value="" />
|
31 |
-
</div>
|
32 |
-
<div class="clearer"></div>
|
33 |
-
</div>
|
34 |
-
</td>
|
35 |
-
<td style="border:0px;" nowrap>
|
36 |
-
<div class="fields" id="field-c0-ppp">
|
37 |
-
<label>CVV Number:</label>
|
38 |
-
<div class="dfield">
|
39 |
-
<input type="text" size="5" name="cfpp_cc_cvv2_number" id="cfpp_cc_cvv2_number" value="" />
|
40 |
-
</div>
|
41 |
-
<div class="clearer"></div>
|
42 |
-
</div>
|
43 |
-
</td>
|
44 |
-
</tr>
|
45 |
-
</table>
|
46 |
-
<table cellpadding="0" cellspacing="0" style="margin:0px;border:0px;width:100%;">
|
47 |
-
<tr>
|
48 |
-
<td style="padding:0px;border:0px;" nowrap>
|
49 |
-
<div class="fields" id="field-c0-ppp">
|
50 |
-
<label>Card Type:</label>
|
51 |
-
<div class="dfield">
|
52 |
-
<select name="cfpp_customer_credit_card_type" id="cfpp_customer_credit_card_type"><option value="Visa">Visa</option><option value="MasterCard">MasterCard</option><option value="Discover">Discover</option><option value="Amex">Amex</option></select>
|
53 |
-
</div>
|
54 |
-
<div class="clearer"></div>
|
55 |
-
</div>
|
56 |
-
</td>
|
57 |
-
<td style="border:0px;" nowrap>
|
58 |
-
<div class="fields" id="field-c0-ppp">
|
59 |
-
<label>Expiration:</label>
|
60 |
-
<div class="dfield">
|
61 |
-
<select name="cfpp_cc_expiration_month">
|
62 |
-
<option value="01">January</option>
|
63 |
-
<option value="02">February</option>
|
64 |
-
<option value="03">March</option>
|
65 |
-
<option value="04">April</option>
|
66 |
-
<option value="05">May</option>
|
67 |
-
<option value="06">June</option>
|
68 |
-
<option value="07">July</option>
|
69 |
-
<option value="08">August</option>
|
70 |
-
<option value="09">September</option>
|
71 |
-
<option value="10">October</option>
|
72 |
-
<option value="11">November</option>
|
73 |
-
<option value="12">December</option>
|
74 |
-
</select> /
|
75 |
-
<select name="cfpp_cc_expiration_year">
|
76 |
-
<?php $d= intval(date("Y")); for($i=$d;$i<$d+10;$i++) echo '<option value="'.$i.'">'.$i.'</option>'; ?>
|
77 |
-
</select>
|
78 |
-
</div>
|
79 |
-
<div class="clearer"></div>
|
80 |
-
</div>
|
81 |
-
</td>
|
82 |
-
</tr>
|
83 |
-
</table>
|
84 |
-
<table cellpadding="0" cellspacing="0" style="margin:0px;border:0px;width:100%;">
|
85 |
-
<tr>
|
86 |
-
<td style="padding:0px;border:0px;" colspan="3" nowrap>Address:<br /><div class="dfield"><input type="text" size="30" name="cfpp_customer_address1" id="cfpp_customer_address1" value="" /><br /><input type="text" size="30" name="cfpp_customer_address2" id="cfpp_customer_address2" value="" /></div></td>
|
87 |
-
</tr>
|
88 |
-
<tr>
|
89 |
-
<td style="padding:0px;border:0px;" nowrap>
|
90 |
-
<div class="fields" id="field-c0-ppp">
|
91 |
-
<label>City:</label>
|
92 |
-
<div class="dfield">
|
93 |
-
<input type="text" size="15" name="cfpp_customer_city" id="cfpp_customer_city" value="" />
|
94 |
-
</div>
|
95 |
-
<div class="clearer"></div>
|
96 |
-
</div>
|
97 |
-
</td>
|
98 |
-
<td style="border:0px;" nowrap>
|
99 |
-
<div class="fields" id="field-c0-ppp">
|
100 |
-
<label>County:</label>
|
101 |
-
<div class="dfield">
|
102 |
-
<input type="text" size="15" name="cfpp_customer_state" id="cfpp_customer_state" value="" />
|
103 |
-
</div>
|
104 |
-
<div class="clearer"></div>
|
105 |
-
</div>
|
106 |
-
</td>
|
107 |
-
<td style="border:0px;" nowrap>
|
108 |
-
<div class="fields" id="field-c0-ppp">
|
109 |
-
<label>Post Code:</label>
|
110 |
-
<div class="dfield">
|
111 |
-
<input type="text" size="5" name="cfpp_customer_zip" id="cfpp_customer_zip" value="" />
|
112 |
-
</div>
|
113 |
-
<div class="clearer"></div>
|
114 |
-
</div>
|
115 |
-
</td>
|
116 |
-
</tr>
|
117 |
-
<tr>
|
118 |
-
<td style="padding:0px;border:0px;" colspan="3" nowrap>
|
119 |
-
|
120 |
-
<div class="fields" id="field-c0-ppp">
|
121 |
-
<label>Country:</label>
|
122 |
-
<div class="dfield">
|
123 |
-
<select name="cfpp_customer_country" id="cfpp_customer_country">
|
124 |
-
<option value="AF">Afghanistan</option>
|
125 |
-
<option value="AX">Åland Islands</option>
|
126 |
-
<option value="AL">Albania</option>
|
127 |
-
<option value="DZ">Algeria</option>
|
128 |
-
<option value="AS">American Samoa</option>
|
129 |
-
<option value="AD">Andorra</option>
|
130 |
-
<option value="AO">Angola</option>
|
131 |
-
<option value="AI">Anguilla</option>
|
132 |
-
<option value="AQ">Antarctica</option>
|
133 |
-
<option value="AG">Antigua and Barbuda</option>
|
134 |
-
<option value="AR">Argentina</option>
|
135 |
-
<option value="AM">Armenia</option>
|
136 |
-
<option value="AW">Aruba</option>
|
137 |
-
<option value="AU">Australia</option>
|
138 |
-
<option value="AT">Austria</option>
|
139 |
-
<option value="AZ">Azerbaijan</option>
|
140 |
-
<option value="BS">Bahamas</option>
|
141 |
-
<option value="BH">Bahrain</option>
|
142 |
-
<option value="BD">Bangladesh</option>
|
143 |
-
<option value="BB">Barbados</option>
|
144 |
-
<option value="BY">Belarus</option>
|
145 |
-
<option value="BE">Belgium</option>
|
146 |
-
<option value="BZ">Belize</option>
|
147 |
-
<option value="BJ">Benin</option>
|
148 |
-
<option value="BM">Bermuda</option>
|
149 |
-
<option value="BT">Bhutan</option>
|
150 |
-
<option value="BO">Bolivia, Plurinational State of</option>
|
151 |
-
<option value="BQ">Bonaire, Sint Eustatius and Saba</option>
|
152 |
-
<option value="BA">Bosnia and Herzegovina</option>
|
153 |
-
<option value="BW">Botswana</option>
|
154 |
-
<option value="BV">Bouvet Island</option>
|
155 |
-
<option value="BR">Brazil</option>
|
156 |
-
<option value="IO">British Indian Ocean Territory</option>
|
157 |
-
<option value="BN">Brunei Darussalam</option>
|
158 |
-
<option value="BG">Bulgaria</option>
|
159 |
-
<option value="BF">Burkina Faso</option>
|
160 |
-
<option value="BI">Burundi</option>
|
161 |
-
<option value="KH">Cambodia</option>
|
162 |
-
<option value="CM">Cameroon</option>
|
163 |
-
<option value="CA">Canada</option>
|
164 |
-
<option value="CV">Cape Verde</option>
|
165 |
-
<option value="KY">Cayman Islands</option>
|
166 |
-
<option value="CF">Central African Republic</option>
|
167 |
-
<option value="TD">Chad</option>
|
168 |
-
<option value="CL">Chile</option>
|
169 |
-
<option value="CN">China</option>
|
170 |
-
<option value="CX">Christmas Island</option>
|
171 |
-
<option value="CC">Cocos (Keeling) Islands</option>
|
172 |
-
<option value="CO">Colombia</option>
|
173 |
-
<option value="KM">Comoros</option>
|
174 |
-
<option value="CG">Congo</option>
|
175 |
-
<option value="CD">Congo, the Democratic Republic of the</option>
|
176 |
-
<option value="CK">Cook Islands</option>
|
177 |
-
<option value="CR">Costa Rica</option>
|
178 |
-
<option value="CI">Côte d'Ivoire</option>
|
179 |
-
<option value="HR">Croatia</option>
|
180 |
-
<option value="CU">Cuba</option>
|
181 |
-
<option value="CW">Curaçao</option>
|
182 |
-
<option value="CY">Cyprus</option>
|
183 |
-
<option value="CZ">Czech Republic</option>
|
184 |
-
<option value="DK">Denmark</option>
|
185 |
-
<option value="DJ">Djibouti</option>
|
186 |
-
<option value="DM">Dominica</option>
|
187 |
-
<option value="DO">Dominican Republic</option>
|
188 |
-
<option value="EC">Ecuador</option>
|
189 |
-
<option value="EG">Egypt</option>
|
190 |
-
<option value="SV">El Salvador</option>
|
191 |
-
<option value="GQ">Equatorial Guinea</option>
|
192 |
-
<option value="ER">Eritrea</option>
|
193 |
-
<option value="EE">Estonia</option>
|
194 |
-
<option value="ET">Ethiopia</option>
|
195 |
-
<option value="FK">Falkland Islands (Malvinas)</option>
|
196 |
-
<option value="FO">Faroe Islands</option>
|
197 |
-
<option value="FJ">Fiji</option>
|
198 |
-
<option value="FI">Finland</option>
|
199 |
-
<option value="FR">France</option>
|
200 |
-
<option value="GF">French Guiana</option>
|
201 |
-
<option value="PF">French Polynesia</option>
|
202 |
-
<option value="TF">French Southern Territories</option>
|
203 |
-
<option value="GA">Gabon</option>
|
204 |
-
<option value="GM">Gambia</option>
|
205 |
-
<option value="GE">Georgia</option>
|
206 |
-
<option value="DE">Germany</option>
|
207 |
-
<option value="GH">Ghana</option>
|
208 |
-
<option value="GI">Gibraltar</option>
|
209 |
-
<option value="GR">Greece</option>
|
210 |
-
<option value="GL">Greenland</option>
|
211 |
-
<option value="GD">Grenada</option>
|
212 |
-
<option value="GP">Guadeloupe</option>
|
213 |
-
<option value="GU">Guam</option>
|
214 |
-
<option value="GT">Guatemala</option>
|
215 |
-
<option value="GG">Guernsey</option>
|
216 |
-
<option value="GN">Guinea</option>
|
217 |
-
<option value="GW">Guinea-Bissau</option>
|
218 |
-
<option value="GY">Guyana</option>
|
219 |
-
<option value="HT">Haiti</option>
|
220 |
-
<option value="HM">Heard Island and McDonald Islands</option>
|
221 |
-
<option value="VA">Holy See (Vatican City State)</option>
|
222 |
-
<option value="HN">Honduras</option>
|
223 |
-
<option value="HK">Hong Kong</option>
|
224 |
-
<option value="HU">Hungary</option>
|
225 |
-
<option value="IS">Iceland</option>
|
226 |
-
<option value="IN">India</option>
|
227 |
-
<option value="ID">Indonesia</option>
|
228 |
-
<option value="IR">Iran, Islamic Republic of</option>
|
229 |
-
<option value="IQ">Iraq</option>
|
230 |
-
<option value="IE">Ireland</option>
|
231 |
-
<option value="IM">Isle of Man</option>
|
232 |
-
<option value="IL">Israel</option>
|
233 |
-
<option value="IT">Italy</option>
|
234 |
-
<option value="JM">Jamaica</option>
|
235 |
-
<option value="JP">Japan</option>
|
236 |
-
<option value="JE">Jersey</option>
|
237 |
-
<option value="JO">Jordan</option>
|
238 |
-
<option value="KZ">Kazakhstan</option>
|
239 |
-
<option value="KE">Kenya</option>
|
240 |
-
<option value="KI">Kiribati</option>
|
241 |
-
<option value="KP">Korea, Democratic People's Republic of</option>
|
242 |
-
<option value="KR">Korea, Republic of</option>
|
243 |
-
<option value="KW">Kuwait</option>
|
244 |
-
<option value="KG">Kyrgyzstan</option>
|
245 |
-
<option value="LA">Lao People's Democratic Republic</option>
|
246 |
-
<option value="LV">Latvia</option>
|
247 |
-
<option value="LB">Lebanon</option>
|
248 |
-
<option value="LS">Lesotho</option>
|
249 |
-
<option value="LR">Liberia</option>
|
250 |
-
<option value="LY">Libya</option>
|
251 |
-
<option value="LI">Liechtenstein</option>
|
252 |
-
<option value="LT">Lithuania</option>
|
253 |
-
<option value="LU">Luxembourg</option>
|
254 |
-
<option value="MO">Macao</option>
|
255 |
-
<option value="MK">Macedonia, the former Yugoslav Republic of</option>
|
256 |
-
<option value="MG">Madagascar</option>
|
257 |
-
<option value="MW">Malawi</option>
|
258 |
-
<option value="MY">Malaysia</option>
|
259 |
-
<option value="MV">Maldives</option>
|
260 |
-
<option value="ML">Mali</option>
|
261 |
-
<option value="MT">Malta</option>
|
262 |
-
<option value="MH">Marshall Islands</option>
|
263 |
-
<option value="MQ">Martinique</option>
|
264 |
-
<option value="MR">Mauritania</option>
|
265 |
-
<option value="MU">Mauritius</option>
|
266 |
-
<option value="YT">Mayotte</option>
|
267 |
-
<option value="MX">Mexico</option>
|
268 |
-
<option value="FM">Micronesia, Federated States of</option>
|
269 |
-
<option value="MD">Moldova, Republic of</option>
|
270 |
-
<option value="MC">Monaco</option>
|
271 |
-
<option value="MN">Mongolia</option>
|
272 |
-
<option value="ME">Montenegro</option>
|
273 |
-
<option value="MS">Montserrat</option>
|
274 |
-
<option value="MA">Morocco</option>
|
275 |
-
<option value="MZ">Mozambique</option>
|
276 |
-
<option value="MM">Myanmar</option>
|
277 |
-
<option value="NA">Namibia</option>
|
278 |
-
<option value="NR">Nauru</option>
|
279 |
-
<option value="NP">Nepal</option>
|
280 |
-
<option value="NL">Netherlands</option>
|
281 |
-
<option value="NC">New Caledonia</option>
|
282 |
-
<option value="NZ">New Zealand</option>
|
283 |
-
<option value="NI">Nicaragua</option>
|
284 |
-
<option value="NE">Niger</option>
|
285 |
-
<option value="NG">Nigeria</option>
|
286 |
-
<option value="NU">Niue</option>
|
287 |
-
<option value="NF">Norfolk Island</option>
|
288 |
-
<option value="MP">Northern Mariana Islands</option>
|
289 |
-
<option value="NO">Norway</option>
|
290 |
-
<option value="OM">Oman</option>
|
291 |
-
<option value="PK">Pakistan</option>
|
292 |
-
<option value="PW">Palau</option>
|
293 |
-
<option value="PS">Palestinian Territory, Occupied</option>
|
294 |
-
<option value="PA">Panama</option>
|
295 |
-
<option value="PG">Papua New Guinea</option>
|
296 |
-
<option value="PY">Paraguay</option>
|
297 |
-
<option value="PE">Peru</option>
|
298 |
-
<option value="PH">Philippines</option>
|
299 |
-
<option value="PN">Pitcairn</option>
|
300 |
-
<option value="PL">Poland</option>
|
301 |
-
<option value="PT">Portugal</option>
|
302 |
-
<option value="PR">Puerto Rico</option>
|
303 |
-
<option value="QA">Qatar</option>
|
304 |
-
<option value="RE">Réunion</option>
|
305 |
-
<option value="RO">Romania</option>
|
306 |
-
<option value="RU">Russian Federation</option>
|
307 |
-
<option value="RW">Rwanda</option>
|
308 |
-
<option value="BL">Saint Barthélemy</option>
|
309 |
-
<option value="SH">Saint Helena, Ascension and Tristan da Cunha</option>
|
310 |
-
<option value="KN">Saint Kitts and Nevis</option>
|
311 |
-
<option value="LC">Saint Lucia</option>
|
312 |
-
<option value="MF">Saint Martin (French part)</option>
|
313 |
-
<option value="PM">Saint Pierre and Miquelon</option>
|
314 |
-
<option value="VC">Saint Vincent and the Grenadines</option>
|
315 |
-
<option value="WS">Samoa</option>
|
316 |
-
<option value="SM">San Marino</option>
|
317 |
-
<option value="ST">Sao Tome and Principe</option>
|
318 |
-
<option value="SA">Saudi Arabia</option>
|
319 |
-
<option value="SN">Senegal</option>
|
320 |
-
<option value="RS">Serbia</option>
|
321 |
-
<option value="SC">Seychelles</option>
|
322 |
-
<option value="SL">Sierra Leone</option>
|
323 |
-
<option value="SG">Singapore</option>
|
324 |
-
<option value="SX">Sint Maarten (Dutch part)</option>
|
325 |
-
<option value="SK">Slovakia</option>
|
326 |
-
<option value="SI">Slovenia</option>
|
327 |
-
<option value="SB">Solomon Islands</option>
|
328 |
-
<option value="SO">Somalia</option>
|
329 |
-
<option value="ZA">South Africa</option>
|
330 |
-
<option value="GS">South Georgia and the South Sandwich Islands</option>
|
331 |
-
<option value="SS">South Sudan</option>
|
332 |
-
<option value="ES">Spain</option>
|
333 |
-
<option value="LK">Sri Lanka</option>
|
334 |
-
<option value="SD">Sudan</option>
|
335 |
-
<option value="SR">Suriname</option>
|
336 |
-
<option value="SJ">Svalbard and Jan Mayen</option>
|
337 |
-
<option value="SZ">Swaziland</option>
|
338 |
-
<option value="SE">Sweden</option>
|
339 |
-
<option value="CH">Switzerland</option>
|
340 |
-
<option value="SY">Syrian Arab Republic</option>
|
341 |
-
<option value="TW">Taiwan, Province of China</option>
|
342 |
-
<option value="TJ">Tajikistan</option>
|
343 |
-
<option value="TZ">Tanzania, United Republic of</option>
|
344 |
-
<option value="TH">Thailand</option>
|
345 |
-
<option value="TL">Timor-Leste</option>
|
346 |
-
<option value="TG">Togo</option>
|
347 |
-
<option value="TK">Tokelau</option>
|
348 |
-
<option value="TO">Tonga</option>
|
349 |
-
<option value="TT">Trinidad and Tobago</option>
|
350 |
-
<option value="TN">Tunisia</option>
|
351 |
-
<option value="TR">Turkey</option>
|
352 |
-
<option value="TM">Turkmenistan</option>
|
353 |
-
<option value="TC">Turks and Caicos Islands</option>
|
354 |
-
<option value="TV">Tuvalu</option>
|
355 |
-
<option value="UG">Uganda</option>
|
356 |
-
<option value="UA">Ukraine</option>
|
357 |
-
<option value="AE">United Arab Emirates</option>
|
358 |
-
<option value="GB">United Kingdom</option>
|
359 |
-
<option value="US" selected>United States</option>
|
360 |
-
<option value="UM">United States Minor Outlying Islands</option>
|
361 |
-
<option value="UY">Uruguay</option>
|
362 |
-
<option value="UZ">Uzbekistan</option>
|
363 |
-
<option value="VU">Vanuatu</option>
|
364 |
-
<option value="VE">Venezuela, Bolivarian Republic of</option>
|
365 |
-
<option value="VN">Viet Nam</option>
|
366 |
-
<option value="VG">Virgin Islands, British</option>
|
367 |
-
<option value="VI">Virgin Islands, U.S.</option>
|
368 |
-
<option value="WF">Wallis and Futuna</option>
|
369 |
-
<option value="EH">Western Sahara</option>
|
370 |
-
<option value="YE">Yemen</option>
|
371 |
-
<option value="ZM">Zambia</option>
|
372 |
-
<option value="ZW">Zimbabwe</option>
|
373 |
-
</select>
|
374 |
-
</div>
|
375 |
-
<div class="clearer"></div>
|
376 |
-
</div>
|
377 |
-
</td>
|
378 |
-
</tr>
|
379 |
-
</table>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
cp_ppp_public_int.inc.php
DELETED
@@ -1,148 +0,0 @@
|
|
1 |
-
<?php if ( !defined('CP_AUTH_INCLUDE') ) { echo 'Direct access not allowed.'; exit; } ?>
|
2 |
-
</p>
|
3 |
-
<?php
|
4 |
-
$raw_form_str = str_replace("\r"," ",str_replace("\n"," ",cp_ppp_cleanJSON(cp_ppp_get_option('form_structure', CP_PPP_DEFAULT_form_structure,$id))));
|
5 |
-
|
6 |
-
$form_data = json_decode( $raw_form_str );
|
7 |
-
if( is_null( $form_data ) ){
|
8 |
-
$json = new JSON;
|
9 |
-
$form_data = $json->unserialize( $raw_form_str );
|
10 |
-
}
|
11 |
-
|
12 |
-
if( !is_null( $form_data ) )
|
13 |
-
{
|
14 |
-
if( !empty( $form_data[ 0 ] ) )
|
15 |
-
{
|
16 |
-
foreach( $form_data[ 0 ] as $key => $object )
|
17 |
-
{
|
18 |
-
if( isset( $object->isDataSource ) && $object->isDataSource && function_exists( 'mcrypt_encrypt' ) )
|
19 |
-
{
|
20 |
-
$connection = new stdClass();
|
21 |
-
$connection->connection = base64_encode( mcrypt_encrypt( MCRYPT_RIJNDAEL_256, cp_ppp_get_option('form_structure', CP_PPP_DEFAULT_form_structure,$id), serialize( $object->list->database->databaseData ), MCRYPT_MODE_ECB ) );
|
22 |
-
$connection->form = $id;
|
23 |
-
|
24 |
-
$object->list->database->databaseData = $connection;
|
25 |
-
$form_data[ 0 ][ $key ] = $object;
|
26 |
-
$raw_form_str = json_encode( $form_data );
|
27 |
-
}
|
28 |
-
}
|
29 |
-
}
|
30 |
-
|
31 |
-
if( isset( $form_data[ 1 ] ) && isset( $form_data[ 1 ][ 0 ] ) && isset( $form_data[ 1 ][ 0 ]->formtemplate ) )
|
32 |
-
{
|
33 |
-
$templatelist = cp_ppp_available_templates();
|
34 |
-
if( isset( $templatelist[ $form_data[ 1 ][ 0 ]->formtemplate ] ) );
|
35 |
-
print '<link href="'.esc_attr( esc_url( $templatelist[ $form_data[ 1 ][ 0 ]->formtemplate ][ 'file' ] ) ).'" type="text/css" rel="stylesheet" />';
|
36 |
-
}
|
37 |
-
}
|
38 |
-
|
39 |
-
$raw_form_str = str_replace('"','"',esc_attr($raw_form_str));
|
40 |
-
?>
|
41 |
-
<script type="text/javascript">
|
42 |
-
function cp_ppp_cerror(id){$dexQuery = jQuery.noConflict();$dexQuery("#hdcaptcha_error"+id).css('top',$dexQuery("#hdcaptcha"+id).outerHeight());$dexQuery("#hdcaptcha_error"+id).css("display","inline");}
|
43 |
-
function doValidate<?php echo $CP_CPP_global_form_count; ?>(form)
|
44 |
-
{
|
45 |
-
$dexQuery = jQuery.noConflict();
|
46 |
-
document.cp_ppp_pform<?php echo $CP_CPP_global_form_count; ?>.cp_ref_page.value = document.location;
|
47 |
-
<?php if (cp_ppp_get_option('cv_enable_captcha', CP_PPP_DEFAULT_cv_enable_captcha,$id) != 'false') { ?> if ($dexQuery("#hdcaptcha_cp_ppp_post<?php echo $CP_CPP_global_form_count; ?>").val() == '')
|
48 |
-
{
|
49 |
-
//alert('<?php _e('Please enter the captcha verification code.'); ?>');
|
50 |
-
setTimeout( "cp_ppp_cerror('<?php echo $CP_CPP_global_form_count; ?>')", 100);
|
51 |
-
return false;
|
52 |
-
}
|
53 |
-
var result = $dexQuery.ajax({
|
54 |
-
type: "GET",
|
55 |
-
url: "<?php echo cp_ppp_get_site_url(); ?>?ps=<?php echo $CP_CPP_global_form_count; ?>"+String.fromCharCode(38)+"inAdmin=1"+String.fromCharCode(38)+"cp_ppp_id=<?php echo $id; ?>"+String.fromCharCode(38)+"hdcaptcha_cp_ppp_post="+$dexQuery("#hdcaptcha_cp_ppp_post<?php echo $CP_CPP_global_form_count; ?>").val(),
|
56 |
-
async: false
|
57 |
-
}).responseText;
|
58 |
-
if (result.indexOf("captchafailed") != -1)
|
59 |
-
{
|
60 |
-
$dexQuery("#captchaimg<?php echo $CP_CPP_global_form_count; ?>").attr('src', $dexQuery("#captchaimg<?php echo $CP_CPP_global_form_count; ?>").attr('src')+'&'+Date());
|
61 |
-
//alert('<?php _e('Incorrect captcha code. Please try again.'); ?>');
|
62 |
-
setTimeout( "cp_ppp_cerror('<?php echo $CP_CPP_global_form_count; ?>')", 100);
|
63 |
-
return false;
|
64 |
-
}
|
65 |
-
else <?php } ?>
|
66 |
-
{
|
67 |
-
<?php if (cp_ppp_get_option('enable_paypal',CP_PPP_DEFAULT_ENABLE_PAYPAL) == "3") { ?>
|
68 |
-
if (document.getElementById("cp_ppp_paymentspro<?php echo $CP_CPP_global_form_count; ?>").value != "")
|
69 |
-
$dexQuery.ajax({
|
70 |
-
type: "POST",
|
71 |
-
async: false,
|
72 |
-
url: '<?php echo cp_ppp_get_site_url(); ?>/',
|
73 |
-
data: $dexQuery("#cp_ppp_pform<?php echo $CP_CPP_global_form_count; ?>").serialize(), // serializes the form's elements.
|
74 |
-
success: function(data)
|
75 |
-
{
|
76 |
-
if (data != 'OK')
|
77 |
-
alert(data);
|
78 |
-
else
|
79 |
-
document.getElementById("cp_ppp_paymentspro<?php echo $CP_CPP_global_form_count; ?>").value = "";
|
80 |
-
}
|
81 |
-
});
|
82 |
-
if (document.getElementById("cp_ppp_paymentspro<?php echo $CP_CPP_global_form_count; ?>").value == "")
|
83 |
-
{
|
84 |
-
<?php } ?>
|
85 |
-
var cpefb_error = 0;
|
86 |
-
$dexQuery("#cp_ppp_pform<?php echo $CP_CPP_global_form_count; ?>").find(".cpefb_error").each(function(index){
|
87 |
-
if ($dexQuery(this).css("display")!="none")
|
88 |
-
cpefb_error++;
|
89 |
-
});
|
90 |
-
if (cpefb_error==0)
|
91 |
-
{
|
92 |
-
$dexQuery("#cp_ppp_pform<?php echo $CP_CPP_global_form_count; ?>").find("select").children().each(function(){
|
93 |
-
$dexQuery(this).val($dexQuery(this).attr("vt"));
|
94 |
-
});
|
95 |
-
$dexQuery("#cp_ppp_pform<?php echo $CP_CPP_global_form_count; ?>").find("input:checkbox,input:radio").each(function(){
|
96 |
-
$dexQuery(this).val($dexQuery(this).attr("vt"));
|
97 |
-
});
|
98 |
-
$dexQuery("#cp_ppp_pform<?php echo $CP_CPP_global_form_count; ?>").find( '.ignore' ).parents( '.fields' ).remove();
|
99 |
-
}
|
100 |
-
document.getElementById("form_structure<?php echo $CP_CPP_global_form_count; ?>").value = '';
|
101 |
-
return true;
|
102 |
-
<?php if (cp_ppp_get_option('enable_paypal',CP_PPP_DEFAULT_ENABLE_PAYPAL) == "3") { ?>
|
103 |
-
}
|
104 |
-
else
|
105 |
-
{
|
106 |
-
return false;
|
107 |
-
}
|
108 |
-
<?php } ?>
|
109 |
-
}
|
110 |
-
}
|
111 |
-
</script>
|
112 |
-
<form class="cpp_form" name="cp_ppp_pform<?php echo $CP_CPP_global_form_count; ?>" id="cp_ppp_pform<?php echo $CP_CPP_global_form_count; ?>" action="<?php get_site_url(); ?>" method="post" enctype="multipart/form-data" onsubmit="return doValidate<?php echo $CP_CPP_global_form_count; ?>(this);"><input type="hidden" name="cp_pform_psequence" value="<?php echo $CP_CPP_global_form_count; ?>" /><input type="hidden" name="cp_ppp_pform_process" value="1" /><input type="hidden" name="cp_ppp_id" value="<?php echo $id; ?>" /><input type="hidden" name="cp_ref_page" value="<?php esc_attr(cp_ppp_get_FULL_site_url); ?>" /><input type="hidden" name="form_structure<?php echo $CP_CPP_global_form_count; ?>" id="form_structure<?php echo $CP_CPP_global_form_count; ?>" size="180" value="<?php echo $raw_form_str; ?>" /><input type="hidden" id="cp_ppp_paymentspro<?php echo $CP_CPP_global_form_count; ?>" name="cp_ppp_paymentspro<?php echo $CP_CPP_global_form_count; ?>" value="1" />
|
113 |
-
<div id="fbuilder">
|
114 |
-
<div id="fbuilder<?php echo $CP_CPP_global_form_count; ?>">
|
115 |
-
<div id="formheader<?php echo $CP_CPP_global_form_count; ?>"></div>
|
116 |
-
<div id="fieldlist<?php echo $CP_CPP_global_form_count; ?>"></div>
|
117 |
-
</div>
|
118 |
-
</div>
|
119 |
-
<div id="cpcaptchalayer<?php echo $CP_CPP_global_form_count; ?>">
|
120 |
-
<?php if (count($codes)) { ?>
|
121 |
-
<?php _e('Coupon code (optional)'); ?>:<br />
|
122 |
-
<input type="text" name="couponcode" value=""><br />
|
123 |
-
<?php } ?>
|
124 |
-
<?php if (cp_ppp_get_option('enable_paypal',CP_PPP_DEFAULT_ENABLE_PAYPAL,$id) == '2') { ?>
|
125 |
-
<div class="fields" id="field-c0">
|
126 |
-
<label>Payment options:</label>
|
127 |
-
<div class="dfield">
|
128 |
-
<input type="radio" name="bccf_payment_option_paypal" vt="1" value="1" checked> <?php echo cp_ppp_get_option('enable_paypal_option_yes',CP_PPP_PAYPAL_OPTION_YES,$id); ?><br />
|
129 |
-
<input type="radio" name="bccf_payment_option_paypal" vt="0" value="0"> <?php echo cp_ppp_get_option('enable_paypal_option_no',CP_PPP_PAYPAL_OPTION_NO,$id); ?>
|
130 |
-
</div>
|
131 |
-
<div class="clearer"></div>
|
132 |
-
</div>
|
133 |
-
<?php } ?>
|
134 |
-
<?php if (cp_ppp_get_option('enable_paypal',CP_PPP_DEFAULT_ENABLE_PAYPAL) == "3") @include_once dirname( __FILE__ ) . '/cp_ppp_paypal_pro_int.inc.php'; ?>
|
135 |
-
<?php if (cp_ppp_get_option('cv_enable_captcha', CP_PPP_DEFAULT_cv_enable_captcha,$id) != 'false') { ?>
|
136 |
-
<br /><?php echo __('Please enter the security code','cpppp'); ?>:<br />
|
137 |
-
<img src="<?php echo cp_ppp_get_site_url().'/?cp_ppp=captcha&ps='.$CP_CPP_global_form_count.'&inAdmin=1&width='.cp_ppp_get_option('cv_width', CP_PPP_DEFAULT_cv_width,$id).'&height='.cp_ppp_get_option('cv_height', CP_PPP_DEFAULT_cv_height,$id).'&letter_count='.cp_ppp_get_option('cv_chars', CP_PPP_DEFAULT_cv_chars,$id).'&min_size='.cp_ppp_get_option('cv_min_font_size', CP_PPP_DEFAULT_cv_min_font_size,$id).'&max_size='.cp_ppp_get_option('cv_max_font_size', CP_PPP_DEFAULT_cv_max_font_size,$id).'&noise='.cp_ppp_get_option('cv_noise', CP_PPP_DEFAULT_cv_noise,$id).'&noiselength='.cp_ppp_get_option('cv_noise_length', CP_PPP_DEFAULT_cv_noise_length,$id).'&bcolor='.cp_ppp_get_option('cv_background', CP_PPP_DEFAULT_cv_background,$id).'&border='.cp_ppp_get_option('cv_border', CP_PPP_DEFAULT_cv_border,$id).'&font='.cp_ppp_get_option('cv_font', CP_PPP_DEFAULT_cv_font,$id); ?>" id="captchaimg<?php echo $CP_CPP_global_form_count; ?>" alt="security code" border="0" />
|
138 |
-
<br />
|
139 |
-
<?php echo __('Security Code','cpppp'); ?>:<br />
|
140 |
-
<div class="dfield">
|
141 |
-
<input type="text" size="20" name="hdcaptcha_cp_ppp_post" id="hdcaptcha_cp_ppp_post<?php echo $CP_CPP_global_form_count; ?>" value="" />
|
142 |
-
<div class="error cpefb_error message" id="hdcaptcha_error<?php echo $CP_CPP_global_form_count; ?>" generated="true" style="display:none;position: absolute; left: 0px; top: 25px;"><?php _e('Please enter the captcha verification code.'); ?></div>
|
143 |
-
</div>
|
144 |
-
<br />
|
145 |
-
<?php } ?>
|
146 |
-
</div>
|
147 |
-
<div id="cp_subbtn<?php echo $CP_CPP_global_form_count; ?>" class="cp_subbtn"><?php _e($button_label); ?></div>
|
148 |
-
</form>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
cp_ppp_scripts.js
DELETED
@@ -1,3 +0,0 @@
|
|
1 |
-
function cp_ppp_insertForm() {
|
2 |
-
send_to_editor('[CP_PPP]');
|
3 |
-
}
|
|
|
|
|
|
css/cupertino/images/ui-bg_diagonals-thick_90_eeeeee_40x40.png
DELETED
Binary file
|
css/cupertino/images/ui-bg_flat_15_cd0a0a_40x100.png
DELETED
Binary file
|
css/cupertino/images/ui-bg_glass_100_e4f1fb_1x400.png
DELETED
Binary file
|
css/cupertino/images/ui-bg_glass_50_3baae3_1x400.png
DELETED
Binary file
|
css/cupertino/images/ui-bg_glass_80_d7ebf9_1x400.png
DELETED
Binary file
|
css/cupertino/images/ui-bg_glass_80_eebd4d_1x400.png
DELETED
Binary file
|
css/cupertino/images/ui-bg_highlight-hard_100_f2f5f7_1x100.png
DELETED
Binary file
|
css/cupertino/images/ui-bg_highlight-hard_70_000000_1x100.png
DELETED
Binary file
|
css/cupertino/images/ui-bg_highlight-soft_100_deedf7_1x100.png
DELETED
Binary file
|
css/cupertino/images/ui-bg_highlight-soft_25_ffef8f_1x100.png
DELETED
Binary file
|
css/cupertino/images/ui-icons_2694e8_256x240.png
DELETED
Binary file
|
css/cupertino/images/ui-icons_2e83ff_256x240.png
DELETED
Binary file
|
css/cupertino/images/ui-icons_3d80b3_256x240.png
DELETED
Binary file
|
css/cupertino/images/ui-icons_72a7cf_256x240.png
DELETED
Binary file
|
css/cupertino/images/ui-icons_ffffff_256x240.png
DELETED
Binary file
|
css/cupertino/jquery-ui-1.8.20.custom.css
DELETED
@@ -1,565 +0,0 @@
|
|
1 |
-
/*!
|
2 |
-
* jQuery UI CSS Framework 1.8.20
|
3 |
-
*
|
4 |
-
* Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
|
5 |
-
* Dual licensed under the MIT or GPL Version 2 licenses.
|
6 |
-
* http://jquery.org/license
|
7 |
-
*
|
8 |
-
* http://docs.jquery.com/UI/Theming/API
|
9 |
-
*/
|
10 |
-
|
11 |
-
/* Layout helpers
|
12 |
-
----------------------------------*/
|
13 |
-
.ui-helper-hidden { display: none; }
|
14 |
-
.ui-helper-hidden-accessible { position: absolute !important; clip: rect(1px 1px 1px 1px); clip: rect(1px,1px,1px,1px); }
|
15 |
-
.ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; }
|
16 |
-
.ui-helper-clearfix:before, .ui-helper-clearfix:after { content: ""; display: table; }
|
17 |
-
.ui-helper-clearfix:after { clear: both; }
|
18 |
-
.ui-helper-clearfix { zoom: 1; }
|
19 |
-
.ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); }
|
20 |
-
|
21 |
-
|
22 |
-
/* Interaction Cues
|
23 |
-
----------------------------------*/
|
24 |
-
.ui-state-disabled { cursor: default !important; }
|
25 |
-
|
26 |
-
|
27 |
-
/* Icons
|
28 |
-
----------------------------------*/
|
29 |
-
|
30 |
-
/* states and images */
|
31 |
-
.ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; }
|
32 |
-
|
33 |
-
|
34 |
-
/* Misc visuals
|
35 |
-
----------------------------------*/
|
36 |
-
|
37 |
-
/* Overlays */
|
38 |
-
.ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
|
39 |
-
|
40 |
-
|
41 |
-
/*!
|
42 |
-
* jQuery UI CSS Framework 1.8.20
|
43 |
-
*
|
44 |
-
* Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
|
45 |
-
* Dual licensed under the MIT or GPL Version 2 licenses.
|
46 |
-
* http://jquery.org/license
|
47 |
-
*
|
48 |
-
* http://docs.jquery.com/UI/Theming/API
|
49 |
-
*
|
50 |
-
* To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Lucida%20Grande,%20Lucida%20Sans,%20Arial,%20sans-serif&fwDefault=bold&fsDefault=1.1em&cornerRadius=6px&bgColorHeader=deedf7&bgTextureHeader=03_highlight_soft.png&bgImgOpacityHeader=100&borderColorHeader=aed0ea&fcHeader=222222&iconColorHeader=72a7cf&bgColorContent=f2f5f7&bgTextureContent=04_highlight_hard.png&bgImgOpacityContent=100&borderColorContent=dddddd&fcContent=362b36&iconColorContent=72a7cf&bgColorDefault=d7ebf9&bgTextureDefault=02_glass.png&bgImgOpacityDefault=80&borderColorDefault=aed0ea&fcDefault=2779aa&iconColorDefault=3d80b3&bgColorHover=e4f1fb&bgTextureHover=02_glass.png&bgImgOpacityHover=100&borderColorHover=74b2e2&fcHover=0070a3&iconColorHover=2694e8&bgColorActive=3baae3&bgTextureActive=02_glass.png&bgImgOpacityActive=50&borderColorActive=2694e8&fcActive=ffffff&iconColorActive=ffffff&bgColorHighlight=ffef8f&bgTextureHighlight=03_highlight_soft.png&bgImgOpacityHighlight=25&borderColorHighlight=f9dd34&fcHighlight=363636&iconColorHighlight=2e83ff&bgColorError=cd0a0a&bgTextureError=01_flat.png&bgImgOpacityError=15&borderColorError=cd0a0a&fcError=ffffff&iconColorError=ffffff&bgColorOverlay=eeeeee&bgTextureOverlay=08_diagonals_thick.png&bgImgOpacityOverlay=90&opacityOverlay=80&bgColorShadow=000000&bgTextureShadow=04_highlight_hard.png&bgImgOpacityShadow=70&opacityShadow=30&thicknessShadow=7px&offsetTopShadow=-7px&offsetLeftShadow=-7px&cornerRadiusShadow=8px
|
51 |
-
*/
|
52 |
-
|
53 |
-
|
54 |
-
/* Component containers
|
55 |
-
----------------------------------*/
|
56 |
-
.ui-widget { font-family: Lucida Grande, Lucida Sans, Arial, sans-serif; font-size: 1.1em; }
|
57 |
-
.ui-widget .ui-widget { font-size: 1em; }
|
58 |
-
.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Lucida Grande, Lucida Sans, Arial, sans-serif; font-size: 1em; }
|
59 |
-
.ui-widget-content { border: 1px solid #dddddd; background: #f2f5f7 url(images/ui-bg_highlight-hard_100_f2f5f7_1x100.png) 50% top repeat-x; color: #362b36; }
|
60 |
-
.ui-widget-content a { color: #362b36; }
|
61 |
-
.ui-widget-header { border: 1px solid #aed0ea; background: #deedf7 url(images/ui-bg_highlight-soft_100_deedf7_1x100.png) 50% 50% repeat-x; color: #222222; font-weight: bold; }
|
62 |
-
.ui-widget-header a { color: #222222; }
|
63 |
-
|
64 |
-
/* Interaction states
|
65 |
-
----------------------------------*/
|
66 |
-
.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #aed0ea; background: #d7ebf9 url(images/ui-bg_glass_80_d7ebf9_1x400.png) 50% 50% repeat-x; font-weight: bold; color: #2779aa; }
|
67 |
-
.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #2779aa; text-decoration: none; }
|
68 |
-
.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border: 1px solid #74b2e2; background: #e4f1fb url(images/ui-bg_glass_100_e4f1fb_1x400.png) 50% 50% repeat-x; font-weight: bold; color: #0070a3; }
|
69 |
-
.ui-state-hover a, .ui-state-hover a:hover { color: #0070a3; text-decoration: none; }
|
70 |
-
.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { border: 1px solid #2694e8; background: #3baae3 url(images/ui-bg_glass_50_3baae3_1x400.png) 50% 50% repeat-x; font-weight: bold; color: #ffffff; }
|
71 |
-
.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #ffffff; text-decoration: none; }
|
72 |
-
.ui-widget :active { outline: none; }
|
73 |
-
|
74 |
-
/* Interaction Cues
|
75 |
-
----------------------------------*/
|
76 |
-
.ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight {border: 1px solid #f9dd34; background: #ffef8f url(images/ui-bg_highlight-soft_25_ffef8f_1x100.png) 50% top repeat-x; color: #363636; }
|
77 |
-
.ui-state-highlight a, .ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a { color: #363636; }
|
78 |
-
.ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error {border: 1px solid #cd0a0a; background: #cd0a0a url(images/ui-bg_flat_15_cd0a0a_40x100.png) 50% 50% repeat-x; color: #ffffff; }
|
79 |
-
.ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a { color: #ffffff; }
|
80 |
-
.ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { color: #ffffff; }
|
81 |
-
.ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary { font-weight: bold; }
|
82 |
-
.ui-priority-secondary, .ui-widget-content .ui-priority-secondary, .ui-widget-header .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; }
|
83 |
-
.ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; }
|
84 |
-
|
85 |
-
/* Icons
|
86 |
-
----------------------------------*/
|
87 |
-
|
88 |
-
/* states and images */
|
89 |
-
.ui-icon { width: 16px; height: 16px; background-image: url(images/ui-icons_72a7cf_256x240.png); }
|
90 |
-
.ui-widget-content .ui-icon {background-image: url(images/ui-icons_72a7cf_256x240.png); }
|
91 |
-
.ui-widget-header .ui-icon {background-image: url(images/ui-icons_72a7cf_256x240.png); }
|
92 |
-
.ui-state-default .ui-icon { background-image: url(images/ui-icons_3d80b3_256x240.png); }
|
93 |
-
.ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(images/ui-icons_2694e8_256x240.png); }
|
94 |
-
.ui-state-active .ui-icon {background-image: url(images/ui-icons_ffffff_256x240.png); }
|
95 |
-
.ui-state-highlight .ui-icon {background-image: url(images/ui-icons_2e83ff_256x240.png); }
|
96 |
-
.ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(images/ui-icons_ffffff_256x240.png); }
|
97 |
-
|
98 |
-
/* positioning */
|
99 |
-
.ui-icon-carat-1-n { background-position: 0 0; }
|
100 |
-
.ui-icon-carat-1-ne { background-position: -16px 0; }
|
101 |
-
.ui-icon-carat-1-e { background-position: -32px 0; }
|
102 |
-
.ui-icon-carat-1-se { background-position: -48px 0; }
|
103 |
-
.ui-icon-carat-1-s { background-position: -64px 0; }
|
104 |
-
.ui-icon-carat-1-sw { background-position: -80px 0; }
|
105 |
-
.ui-icon-carat-1-w { background-position: -96px 0; }
|
106 |
-
.ui-icon-carat-1-nw { background-position: -112px 0; }
|
107 |
-
.ui-icon-carat-2-n-s { background-position: -128px 0; }
|
108 |
-
.ui-icon-carat-2-e-w { background-position: -144px 0; }
|
109 |
-
.ui-icon-triangle-1-n { background-position: 0 -16px; }
|
110 |
-
.ui-icon-triangle-1-ne { background-position: -16px -16px; }
|
111 |
-
.ui-icon-triangle-1-e { background-position: -32px -16px; }
|
112 |
-
.ui-icon-triangle-1-se { background-position: -48px -16px; }
|
113 |
-
.ui-icon-triangle-1-s { background-position: -64px -16px; }
|
114 |
-
.ui-icon-triangle-1-sw { background-position: -80px -16px; }
|
115 |
-
.ui-icon-triangle-1-w { background-position: -96px -16px; }
|
116 |
-
.ui-icon-triangle-1-nw { background-position: -112px -16px; }
|
117 |
-
.ui-icon-triangle-2-n-s { background-position: -128px -16px; }
|
118 |
-
.ui-icon-triangle-2-e-w { background-position: -144px -16px; }
|
119 |
-
.ui-icon-arrow-1-n { background-position: 0 -32px; }
|
120 |
-
.ui-icon-arrow-1-ne { background-position: -16px -32px; }
|
121 |
-
.ui-icon-arrow-1-e { background-position: -32px -32px; }
|
122 |
-
.ui-icon-arrow-1-se { background-position: -48px -32px; }
|
123 |
-
.ui-icon-arrow-1-s { background-position: -64px -32px; }
|
124 |
-
.ui-icon-arrow-1-sw { background-position: -80px -32px; }
|
125 |
-
.ui-icon-arrow-1-w { background-position: -96px -32px; }
|
126 |
-
.ui-icon-arrow-1-nw { background-position: -112px -32px; }
|
127 |
-
.ui-icon-arrow-2-n-s { background-position: -128px -32px; }
|
128 |
-
.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; }
|
129 |
-
.ui-icon-arrow-2-e-w { background-position: -160px -32px; }
|
130 |
-
.ui-icon-arrow-2-se-nw { background-position: -176px -32px; }
|
131 |
-
.ui-icon-arrowstop-1-n { background-position: -192px -32px; }
|
132 |
-
.ui-icon-arrowstop-1-e { background-position: -208px -32px; }
|
133 |
-
.ui-icon-arrowstop-1-s { background-position: -224px -32px; }
|
134 |
-
.ui-icon-arrowstop-1-w { background-position: -240px -32px; }
|
135 |
-
.ui-icon-arrowthick-1-n { background-position: 0 -48px; }
|
136 |
-
.ui-icon-arrowthick-1-ne { background-position: -16px -48px; }
|
137 |
-
.ui-icon-arrowthick-1-e { background-position: -32px -48px; }
|
138 |
-
.ui-icon-arrowthick-1-se { background-position: -48px -48px; }
|
139 |
-
.ui-icon-arrowthick-1-s { background-position: -64px -48px; }
|
140 |
-
.ui-icon-arrowthick-1-sw { background-position: -80px -48px; }
|
141 |
-
.ui-icon-arrowthick-1-w { background-position: -96px -48px; }
|
142 |
-
.ui-icon-arrowthick-1-nw { background-position: -112px -48px; }
|
143 |
-
.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; }
|
144 |
-
.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; }
|
145 |
-
.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; }
|
146 |
-
.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; }
|
147 |
-
.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; }
|
148 |
-
.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; }
|
149 |
-
.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; }
|
150 |
-
.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; }
|
151 |
-
.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; }
|
152 |
-
.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; }
|
153 |
-
.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; }
|
154 |
-
.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; }
|
155 |
-
.ui-icon-arrowreturn-1-w { background-position: -64px -64px; }
|
156 |
-
.ui-icon-arrowreturn-1-n { background-position: -80px -64px; }
|
157 |
-
.ui-icon-arrowreturn-1-e { background-position: -96px -64px; }
|
158 |
-
.ui-icon-arrowreturn-1-s { background-position: -112px -64px; }
|
159 |
-
.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; }
|
160 |
-
.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; }
|
161 |
-
.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; }
|
162 |
-
.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; }
|
163 |
-
.ui-icon-arrow-4 { background-position: 0 -80px; }
|
164 |
-
.ui-icon-arrow-4-diag { background-position: -16px -80px; }
|
165 |
-
.ui-icon-extlink { background-position: -32px -80px; }
|
166 |
-
.ui-icon-newwin { background-position: -48px -80px; }
|
167 |
-
.ui-icon-refresh { background-position: -64px -80px; }
|
168 |
-
.ui-icon-shuffle { background-position: -80px -80px; }
|
169 |
-
.ui-icon-transfer-e-w { background-position: -96px -80px; }
|
170 |
-
.ui-icon-transferthick-e-w { background-position: -112px -80px; }
|
171 |
-
.ui-icon-folder-collapsed { background-position: 0 -96px; }
|
172 |
-
.ui-icon-folder-open { background-position: -16px -96px; }
|
173 |
-
.ui-icon-document { background-position: -32px -96px; }
|
174 |
-
.ui-icon-document-b { background-position: -48px -96px; }
|
175 |
-
.ui-icon-note { background-position: -64px -96px; }
|
176 |
-
.ui-icon-mail-closed { background-position: -80px -96px; }
|
177 |
-
.ui-icon-mail-open { background-position: -96px -96px; }
|
178 |
-
.ui-icon-suitcase { background-position: -112px -96px; }
|
179 |
-
.ui-icon-comment { background-position: -128px -96px; }
|
180 |
-
.ui-icon-person { background-position: -144px -96px; }
|
181 |
-
.ui-icon-print { background-position: -160px -96px; }
|
182 |
-
.ui-icon-trash { background-position: -176px -96px; }
|
183 |
-
.ui-icon-locked { background-position: -192px -96px; }
|
184 |
-
.ui-icon-unlocked { background-position: -208px -96px; }
|
185 |
-
.ui-icon-bookmark { background-position: -224px -96px; }
|
186 |
-
.ui-icon-tag { background-position: -240px -96px; }
|
187 |
-
.ui-icon-home { background-position: 0 -112px; }
|
188 |
-
.ui-icon-flag { background-position: -16px -112px; }
|
189 |
-
.ui-icon-calendar { background-position: -32px -112px; }
|
190 |
-
.ui-icon-cart { background-position: -48px -112px; }
|
191 |
-
.ui-icon-pencil { background-position: -64px -112px; }
|
192 |
-
.ui-icon-clock { background-position: -80px -112px; }
|
193 |
-
.ui-icon-disk { background-position: -96px -112px; }
|
194 |
-
.ui-icon-calculator { background-position: -112px -112px; }
|
195 |
-
.ui-icon-zoomin { background-position: -128px -112px; }
|
196 |
-
.ui-icon-zoomout { background-position: -144px -112px; }
|
197 |
-
.ui-icon-search { background-position: -160px -112px; }
|
198 |
-
.ui-icon-wrench { background-position: -176px -112px; }
|
199 |
-
.ui-icon-gear { background-position: -192px -112px; }
|
200 |
-
.ui-icon-heart { background-position: -208px -112px; }
|
201 |
-
.ui-icon-star { background-position: -224px -112px; }
|
202 |
-
.ui-icon-link { background-position: -240px -112px; }
|
203 |
-
.ui-icon-cancel { background-position: 0 -128px; }
|
204 |
-
.ui-icon-plus { background-position: -16px -128px; }
|
205 |
-
.ui-icon-plusthick { background-position: -32px -128px; }
|
206 |
-
.ui-icon-minus { background-position: -48px -128px; }
|
207 |
-
.ui-icon-minusthick { background-position: -64px -128px; }
|
208 |
-
.ui-icon-close { background-position: -80px -128px; }
|
209 |
-
.ui-icon-closethick { background-position: -96px -128px; }
|
210 |
-
.ui-icon-key { background-position: -112px -128px; }
|
211 |
-
.ui-icon-lightbulb { background-position: -128px -128px; }
|
212 |
-
.ui-icon-scissors { background-position: -144px -128px; }
|
213 |
-
.ui-icon-clipboard { background-position: -160px -128px; }
|
214 |
-
.ui-icon-copy { background-position: -176px -128px; }
|
215 |
-
.ui-icon-contact { background-position: -192px -128px; }
|
216 |
-
.ui-icon-image { background-position: -208px -128px; }
|
217 |
-
.ui-icon-video { background-position: -224px -128px; }
|
218 |
-
.ui-icon-script { background-position: -240px -128px; }
|
219 |
-
.ui-icon-alert { background-position: 0 -144px; }
|
220 |
-
.ui-icon-info { background-position: -16px -144px; }
|
221 |
-
.ui-icon-notice { background-position: -32px -144px; }
|
222 |
-
.ui-icon-help { background-position: -48px -144px; }
|
223 |
-
.ui-icon-check { background-position: -64px -144px; }
|
224 |
-
.ui-icon-bullet { background-position: -80px -144px; }
|
225 |
-
.ui-icon-radio-off { background-position: -96px -144px; }
|
226 |
-
.ui-icon-radio-on { background-position: -112px -144px; }
|
227 |
-
.ui-icon-pin-w { background-position: -128px -144px; }
|
228 |
-
.ui-icon-pin-s { background-position: -144px -144px; }
|
229 |
-
.ui-icon-play { background-position: 0 -160px; }
|
230 |
-
.ui-icon-pause { background-position: -16px -160px; }
|
231 |
-
.ui-icon-seek-next { background-position: -32px -160px; }
|
232 |
-
.ui-icon-seek-prev { background-position: -48px -160px; }
|
233 |
-
.ui-icon-seek-end { background-position: -64px -160px; }
|
234 |
-
.ui-icon-seek-start { background-position: -80px -160px; }
|
235 |
-
/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */
|
236 |
-
.ui-icon-seek-first { background-position: -80px -160px; }
|
237 |
-
.ui-icon-stop { background-position: -96px -160px; }
|
238 |
-
.ui-icon-eject { background-position: -112px -160px; }
|
239 |
-
.ui-icon-volume-off { background-position: -128px -160px; }
|
240 |
-
.ui-icon-volume-on { background-position: -144px -160px; }
|
241 |
-
.ui-icon-power { background-position: 0 -176px; }
|
242 |
-
.ui-icon-signal-diag { background-position: -16px -176px; }
|
243 |
-
.ui-icon-signal { background-position: -32px -176px; }
|
244 |
-
.ui-icon-battery-0 { background-position: -48px -176px; }
|
245 |
-
.ui-icon-battery-1 { background-position: -64px -176px; }
|
246 |
-
.ui-icon-battery-2 { background-position: -80px -176px; }
|
247 |
-
.ui-icon-battery-3 { background-position: -96px -176px; }
|
248 |
-
.ui-icon-circle-plus { background-position: 0 -192px; }
|
249 |
-
.ui-icon-circle-minus { background-position: -16px -192px; }
|
250 |
-
.ui-icon-circle-close { background-position: -32px -192px; }
|
251 |
-
.ui-icon-circle-triangle-e { background-position: -48px -192px; }
|
252 |
-
.ui-icon-circle-triangle-s { background-position: -64px -192px; }
|
253 |
-
.ui-icon-circle-triangle-w { background-position: -80px -192px; }
|
254 |
-
.ui-icon-circle-triangle-n { background-position: -96px -192px; }
|
255 |
-
.ui-icon-circle-arrow-e { background-position: -112px -192px; }
|
256 |
-
.ui-icon-circle-arrow-s { background-position: -128px -192px; }
|
257 |
-
.ui-icon-circle-arrow-w { background-position: -144px -192px; }
|
258 |
-
.ui-icon-circle-arrow-n { background-position: -160px -192px; }
|
259 |
-
.ui-icon-circle-zoomin { background-position: -176px -192px; }
|
260 |
-
.ui-icon-circle-zoomout { background-position: -192px -192px; }
|
261 |
-
.ui-icon-circle-check { background-position: -208px -192px; }
|
262 |
-
.ui-icon-circlesmall-plus { background-position: 0 -208px; }
|
263 |
-
.ui-icon-circlesmall-minus { background-position: -16px -208px; }
|
264 |
-
.ui-icon-circlesmall-close { background-position: -32px -208px; }
|
265 |
-
.ui-icon-squaresmall-plus { background-position: -48px -208px; }
|
266 |
-
.ui-icon-squaresmall-minus { background-position: -64px -208px; }
|
267 |
-
.ui-icon-squaresmall-close { background-position: -80px -208px; }
|
268 |
-
.ui-icon-grip-dotted-vertical { background-position: 0 -224px; }
|
269 |
-
.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; }
|
270 |
-
.ui-icon-grip-solid-vertical { background-position: -32px -224px; }
|
271 |
-
.ui-icon-grip-solid-horizontal { background-position: -48px -224px; }
|
272 |
-
.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; }
|
273 |
-
.ui-icon-grip-diagonal-se { background-position: -80px -224px; }
|
274 |
-
|
275 |
-
|
276 |
-
/* Misc visuals
|
277 |
-
----------------------------------*/
|
278 |
-
|
279 |
-
/* Corner radius */
|
280 |
-
.ui-corner-all, .ui-corner-top, .ui-corner-left, .ui-corner-tl { -moz-border-radius-topleft: 6px; -webkit-border-top-left-radius: 6px; -khtml-border-top-left-radius: 6px; border-top-left-radius: 6px; }
|
281 |
-
.ui-corner-all, .ui-corner-top, .ui-corner-right, .ui-corner-tr { -moz-border-radius-topright: 6px; -webkit-border-top-right-radius: 6px; -khtml-border-top-right-radius: 6px; border-top-right-radius: 6px; }
|
282 |
-
.ui-corner-all, .ui-corner-bottom, .ui-corner-left, .ui-corner-bl { -moz-border-radius-bottomleft: 6px; -webkit-border-bottom-left-radius: 6px; -khtml-border-bottom-left-radius: 6px; border-bottom-left-radius: 6px; }
|
283 |
-
.ui-corner-all, .ui-corner-bottom, .ui-corner-right, .ui-corner-br { -moz-border-radius-bottomright: 6px; -webkit-border-bottom-right-radius: 6px; -khtml-border-bottom-right-radius: 6px; border-bottom-right-radius: 6px; }
|
284 |
-
|
285 |
-
/* Overlays */
|
286 |
-
.ui-widget-overlay { background: #eeeeee url(images/ui-bg_diagonals-thick_90_eeeeee_40x40.png) 50% 50% repeat; opacity: .80;filter:Alpha(Opacity=80); }
|
287 |
-
.ui-widget-shadow { margin: -7px 0 0 -7px; padding: 7px; background: #000000 url(images/ui-bg_highlight-hard_70_000000_1x100.png) 50% top repeat-x; opacity: .30;filter:Alpha(Opacity=30); -moz-border-radius: 8px; -khtml-border-radius: 8px; -webkit-border-radius: 8px; border-radius: 8px; }/*!
|
288 |
-
* jQuery UI Resizable 1.8.20
|
289 |
-
*
|
290 |
-
* Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
|
291 |
-
* Dual licensed under the MIT or GPL Version 2 licenses.
|
292 |
-
* http://jquery.org/license
|
293 |
-
*
|
294 |
-
* http://docs.jquery.com/UI/Resizable#theming
|
295 |
-
*/
|
296 |
-
.ui-resizable { position: relative;}
|
297 |
-
.ui-resizable-handle { position: absolute;font-size: 0.1px; display: block; }
|
298 |
-
.ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle { display: none; }
|
299 |
-
.ui-resizable-n { cursor: n-resize; height: 7px; width: 100%; top: -5px; left: 0; }
|
300 |
-
.ui-resizable-s { cursor: s-resize; height: 7px; width: 100%; bottom: -5px; left: 0; }
|
301 |
-
.ui-resizable-e { cursor: e-resize; width: 7px; right: -5px; top: 0; height: 100%; }
|
302 |
-
.ui-resizable-w { cursor: w-resize; width: 7px; left: -5px; top: 0; height: 100%; }
|
303 |
-
.ui-resizable-se { cursor: se-resize; width: 12px; height: 12px; right: 1px; bottom: 1px; }
|
304 |
-
.ui-resizable-sw { cursor: sw-resize; width: 9px; height: 9px; left: -5px; bottom: -5px; }
|
305 |
-
.ui-resizable-nw { cursor: nw-resize; width: 9px; height: 9px; left: -5px; top: -5px; }
|
306 |
-
.ui-resizable-ne { cursor: ne-resize; width: 9px; height: 9px; right: -5px; top: -5px;}/*!
|
307 |
-
* jQuery UI Selectable 1.8.20
|
308 |
-
*
|
309 |
-
* Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
|
310 |
-
* Dual licensed under the MIT or GPL Version 2 licenses.
|
311 |
-
* http://jquery.org/license
|
312 |
-
*
|
313 |
-
* http://docs.jquery.com/UI/Selectable#theming
|
314 |
-
*/
|
315 |
-
.ui-selectable-helper { position: absolute; z-index: 100; border:1px dotted black; }
|
316 |
-
/*!
|
317 |
-
* jQuery UI Accordion 1.8.20
|
318 |
-
*
|
319 |
-
* Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
|
320 |
-
* Dual licensed under the MIT or GPL Version 2 licenses.
|
321 |
-
* http://jquery.org/license
|
322 |
-
*
|
323 |
-
* http://docs.jquery.com/UI/Accordion#theming
|
324 |
-
*/
|
325 |
-
/* IE/Win - Fix animation bug - #4615 */
|
326 |
-
.ui-accordion { width: 100%; }
|
327 |
-
.ui-accordion .ui-accordion-header { cursor: pointer; position: relative; margin-top: 1px; zoom: 1; }
|
328 |
-
.ui-accordion .ui-accordion-li-fix { display: inline; }
|
329 |
-
.ui-accordion .ui-accordion-header-active { border-bottom: 0 !important; }
|
330 |
-
.ui-accordion .ui-accordion-header a { display: block; font-size: 1em; padding: .5em .5em .5em .7em; }
|
331 |
-
.ui-accordion-icons .ui-accordion-header a { padding-left: 2.2em; }
|
332 |
-
.ui-accordion .ui-accordion-header .ui-icon { position: absolute; left: .5em; top: 50%; margin-top: -8px; }
|
333 |
-
.ui-accordion .ui-accordion-content { padding: 1em 2.2em; border-top: 0; margin-top: -2px; position: relative; top: 1px; margin-bottom: 2px; overflow: auto; display: none; zoom: 1; }
|
334 |
-
.ui-accordion .ui-accordion-content-active { display: block; }
|
335 |
-
/*!
|
336 |
-
* jQuery UI Autocomplete 1.8.20
|
337 |
-
*
|
338 |
-
* Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
|
339 |
-
* Dual licensed under the MIT or GPL Version 2 licenses.
|
340 |
-
* http://jquery.org/license
|
341 |
-
*
|
342 |
-
* http://docs.jquery.com/UI/Autocomplete#theming
|
343 |
-
*/
|
344 |
-
.ui-autocomplete { position: absolute; cursor: default; }
|
345 |
-
|
346 |
-
/* workarounds */
|
347 |
-
* html .ui-autocomplete { width:1px; } /* without this, the menu expands to 100% in IE6 */
|
348 |
-
|
349 |
-
/*
|
350 |
-
* jQuery UI Menu 1.8.20
|
351 |
-
*
|
352 |
-
* Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
|
353 |
-
* Dual licensed under the MIT or GPL Version 2 licenses.
|
354 |
-
* http://jquery.org/license
|
355 |
-
*
|
356 |
-
* http://docs.jquery.com/UI/Menu#theming
|
357 |
-
*/
|
358 |
-
.ui-menu {
|
359 |
-
list-style:none;
|
360 |
-
padding: 2px;
|
361 |
-
margin: 0;
|
362 |
-
display:block;
|
363 |
-
float: left;
|
364 |
-
}
|
365 |
-
.ui-menu .ui-menu {
|
366 |
-
margin-top: -3px;
|
367 |
-
}
|
368 |
-
.ui-menu .ui-menu-item {
|
369 |
-
margin:0;
|
370 |
-
padding: 0;
|
371 |
-
zoom: 1;
|
372 |
-
float: left;
|
373 |
-
clear: left;
|
374 |
-
width: 100%;
|
375 |
-
}
|
376 |
-
.ui-menu .ui-menu-item a {
|
377 |
-
text-decoration:none;
|
378 |
-
display:block;
|
379 |
-
padding:.2em .4em;
|
380 |
-
line-height:1.5;
|
381 |
-
zoom:1;
|
382 |
-
}
|
383 |
-
.ui-menu .ui-menu-item a.ui-state-hover,
|
384 |
-
.ui-menu .ui-menu-item a.ui-state-active {
|
385 |
-
font-weight: normal;
|
386 |
-
margin: -1px;
|
387 |
-
}
|
388 |
-
/*!
|
389 |
-
* jQuery UI Button 1.8.20
|
390 |
-
*
|
391 |
-
* Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
|
392 |
-
* Dual licensed under the MIT or GPL Version 2 licenses.
|
393 |
-
* http://jquery.org/license
|
394 |
-
*
|
395 |
-
* http://docs.jquery.com/UI/Button#theming
|
396 |
-
*/
|
397 |
-
.ui-button { display: inline-block; position: relative; padding: 0; margin-right: .1em; text-decoration: none !important; cursor: pointer; text-align: center; zoom: 1; overflow: visible; } /* the overflow property removes extra width in IE */
|
398 |
-
.ui-button-icon-only { width: 2.2em; } /* to make room for the icon, a width needs to be set here */
|
399 |
-
button.ui-button-icon-only { width: 2.4em; } /* button elements seem to need a little more width */
|
400 |
-
.ui-button-icons-only { width: 3.4em; }
|
401 |
-
button.ui-button-icons-only { width: 3.7em; }
|
402 |
-
|
403 |
-
/*button text element */
|
404 |
-
.ui-button .ui-button-text { display: block; line-height: 1.4; }
|
405 |
-
.ui-button-text-only .ui-button-text { padding: .4em 1em; }
|
406 |
-
.ui-button-icon-only .ui-button-text, .ui-button-icons-only .ui-button-text { padding: .4em; text-indent: -9999999px; }
|
407 |
-
.ui-button-text-icon-primary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 1em .4em 2.1em; }
|
408 |
-
.ui-button-text-icon-secondary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 2.1em .4em 1em; }
|
409 |
-
.ui-button-text-icons .ui-button-text { padding-left: 2.1em; padding-right: 2.1em; }
|
410 |
-
/* no icon support for input elements, provide padding by default */
|
411 |
-
input.ui-button { padding: .4em 1em; }
|
412 |
-
|
413 |
-
/*button icon element(s) */
|
414 |
-
.ui-button-icon-only .ui-icon, .ui-button-text-icon-primary .ui-icon, .ui-button-text-icon-secondary .ui-icon, .ui-button-text-icons .ui-icon, .ui-button-icons-only .ui-icon { position: absolute; top: 50%; margin-top: -8px; }
|
415 |
-
.ui-button-icon-only .ui-icon { left: 50%; margin-left: -8px; }
|
416 |
-
.ui-button-text-icon-primary .ui-button-icon-primary, .ui-button-text-icons .ui-button-icon-primary, .ui-button-icons-only .ui-button-icon-primary { left: .5em; }
|
417 |
-
.ui-button-text-icon-secondary .ui-button-icon-secondary, .ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; }
|
418 |
-
.ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; }
|
419 |
-
|
420 |
-
/*button sets*/
|
421 |
-
.ui-buttonset { margin-right: 7px; }
|
422 |
-
.ui-buttonset .ui-button { margin-left: 0; margin-right: -.3em; }
|
423 |
-
|
424 |
-
/* workarounds */
|
425 |
-
button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra padding in Firefox */
|
426 |
-
/*!
|
427 |
-
* jQuery UI Dialog 1.8.20
|
428 |
-
*
|
429 |
-
* Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
|
430 |
-
* Dual licensed under the MIT or GPL Version 2 licenses.
|
431 |
-
* http://jquery.org/license
|
432 |
-
*
|
433 |
-
* http://docs.jquery.com/UI/Dialog#theming
|
434 |
-
*/
|
435 |
-
.ui-dialog { position: absolute; padding: .2em; width: 300px; overflow: hidden; }
|
436 |
-
.ui-dialog .ui-dialog-titlebar { padding: .4em 1em; position: relative; }
|
437 |
-
.ui-dialog .ui-dialog-title { float: left; margin: .1em 16px .1em 0; }
|
438 |
-
.ui-dialog .ui-dialog-titlebar-close { position: absolute; right: .3em; top: 50%; width: 19px; margin: -10px 0 0 0; padding: 1px; height: 18px; }
|
439 |
-
.ui-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; }
|
440 |
-
.ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 0; }
|
441 |
-
.ui-dialog .ui-dialog-content { position: relative; border: 0; padding: .5em 1em; background: none; overflow: auto; zoom: 1; }
|
442 |
-
.ui-dialog .ui-dialog-buttonpane { text-align: left; border-width: 1px 0 0 0; background-image: none; margin: .5em 0 0 0; padding: .3em 1em .5em .4em; }
|
443 |
-
.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { float: right; }
|
444 |
-
.ui-dialog .ui-dialog-buttonpane button { margin: .5em .4em .5em 0; cursor: pointer; }
|
445 |
-
.ui-dialog .ui-resizable-se { width: 14px; height: 14px; right: 3px; bottom: 3px; }
|
446 |
-
.ui-draggable .ui-dialog-titlebar { cursor: move; }
|
447 |
-
/*!
|
448 |
-
* jQuery UI Slider 1.8.20
|
449 |
-
*
|
450 |
-
* Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
|
451 |
-
* Dual licensed under the MIT or GPL Version 2 licenses.
|
452 |
-
* http://jquery.org/license
|
453 |
-
*
|
454 |
-
* http://docs.jquery.com/UI/Slider#theming
|
455 |
-
*/
|
456 |
-
.ui-slider { position: relative; text-align: left; }
|
457 |
-
.ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 1.2em; height: 1.2em; cursor: default; }
|
458 |
-
.ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; background-position: 0 0; }
|
459 |
-
|
460 |
-
.ui-slider-horizontal { height: .8em; }
|
461 |
-
.ui-slider-horizontal .ui-slider-handle { top: -.3em; margin-left: -.6em; }
|
462 |
-
.ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; }
|
463 |
-
.ui-slider-horizontal .ui-slider-range-min { left: 0; }
|
464 |
-
.ui-slider-horizontal .ui-slider-range-max { right: 0; }
|
465 |
-
|
466 |
-
.ui-slider-vertical { width: .8em; height: 100px; }
|
467 |
-
.ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; }
|
468 |
-
.ui-slider-vertical .ui-slider-range { left: 0; width: 100%; }
|
469 |
-
.ui-slider-vertical .ui-slider-range-min { bottom: 0; }
|
470 |
-
.ui-slider-vertical .ui-slider-range-max { top: 0; }/*!
|
471 |
-
* jQuery UI Tabs 1.8.20
|
472 |
-
*
|
473 |
-
* Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
|
474 |
-
* Dual licensed under the MIT or GPL Version 2 licenses.
|
475 |
-
* http://jquery.org/license
|
476 |
-
*
|
477 |
-
* http://docs.jquery.com/UI/Tabs#theming
|
478 |
-
*/
|
479 |
-
#tabs { position: relative; padding: .2em; zoom: 1; } /* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */
|
480 |
-
#tabs .ui-tabs-nav { margin: 0; padding: .2em .2em 0; width:auto}
|
481 |
-
#tabs .ui-tabs-nav li { list-style: none; float: left; position: relative; top: 1px; margin: 0 .2em 1px 0; border-bottom: 0 !important; padding: 0; white-space: nowrap; }
|
482 |
-
#tabs .ui-tabs-nav li a { float: left; padding: .5em 1em; text-decoration: none;width:auto }
|
483 |
-
#tabs .ui-tabs-nav li.ui-tabs-selected { margin-bottom: 0; padding-bottom: 1px; width:auto}
|
484 |
-
#tabs .ui-tabs-nav li.ui-tabs-selected a, #tabs .ui-tabs-nav li.ui-state-disabled a, #tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; width:auto}
|
485 |
-
#tabs .ui-tabs-nav li a, #tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */
|
486 |
-
#tabs .ui-tabs-panel { display: block; border-width: 0; padding: 1em 1.4em; background: none;width:auto;float:none }
|
487 |
-
#tabs .ui-tabs-hide { display: none !important; }
|
488 |
-
/*!
|
489 |
-
* jQuery UI Datepicker 1.8.20
|
490 |
-
*
|
491 |
-
* Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
|
492 |
-
* Dual licensed under the MIT or GPL Version 2 licenses.
|
493 |
-
* http://jquery.org/license
|
494 |
-
*
|
495 |
-
* http://docs.jquery.com/UI/Datepicker#theming
|
496 |
-
*/
|
497 |
-
.ui-datepicker { width: 17em; padding: .2em .2em 0; display: none; }
|
498 |
-
.ui-datepicker .ui-datepicker-header { position:relative; padding:.2em 0; }
|
499 |
-
.ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 2px; width: 1.8em; height: 1.8em; }
|
500 |
-
.ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { top: 1px; }
|
501 |
-
.ui-datepicker .ui-datepicker-prev { left:2px; }
|
502 |
-
.ui-datepicker .ui-datepicker-next { right:2px; }
|
503 |
-
.ui-datepicker .ui-datepicker-prev-hover { left:1px; }
|
504 |
-
.ui-datepicker .ui-datepicker-next-hover { right:1px; }
|
505 |
-
.ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span { display: block; position: absolute; left: 50%; margin-left: -8px; top: 50%; margin-top: -8px; }
|
506 |
-
.ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; }
|
507 |
-
.ui-datepicker .ui-datepicker-title select { font-size:1em; margin:1px 0; }
|
508 |
-
.ui-datepicker select.ui-datepicker-month-year {width: 100%;}
|
509 |
-
.ui-datepicker select.ui-datepicker-month,
|
510 |
-
.ui-datepicker select.ui-datepicker-year { width: 49%;}
|
511 |
-
.ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; }
|
512 |
-
.ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0; }
|
513 |
-
.ui-datepicker td { border: 0; padding: 1px; }
|
514 |
-
.ui-datepicker td span, .ui-datepicker td a { display: block; padding: .2em; text-align: right; text-decoration: none; }
|
515 |
-
.ui-datepicker .ui-datepicker-buttonpane { background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0; }
|
516 |
-
.ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; }
|
517 |
-
.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; }
|
518 |
-
|
519 |
-
/* with multiple calendars */
|
520 |
-
.ui-datepicker.ui-datepicker-multi { width:auto; }
|
521 |
-
.ui-datepicker-multi .ui-datepicker-group { float:left; }
|
522 |
-
.ui-datepicker-multi .ui-datepicker-group table { width:95%; margin:0 auto .4em; }
|
523 |
-
.ui-datepicker-multi-2 .ui-datepicker-group { width:50%; }
|
524 |
-
.ui-datepicker-multi-3 .ui-datepicker-group { width:33.3%; }
|
525 |
-
.ui-datepicker-multi-4 .ui-datepicker-group { width:25%; }
|
526 |
-
.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { border-left-width:0; }
|
527 |
-
.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width:0; }
|
528 |
-
.ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; }
|
529 |
-
.ui-datepicker-row-break { clear:both; width:100%; font-size:0em; }
|
530 |
-
|
531 |
-
/* RTL support */
|
532 |
-
.ui-datepicker-rtl { direction: rtl; }
|
533 |
-
.ui-datepicker-rtl .ui-datepicker-prev { right: 2px; left: auto; }
|
534 |
-
.ui-datepicker-rtl .ui-datepicker-next { left: 2px; right: auto; }
|
535 |
-
.ui-datepicker-rtl .ui-datepicker-prev:hover { right: 1px; left: auto; }
|
536 |
-
.ui-datepicker-rtl .ui-datepicker-next:hover { left: 1px; right: auto; }
|
537 |
-
.ui-datepicker-rtl .ui-datepicker-buttonpane { clear:right; }
|
538 |
-
.ui-datepicker-rtl .ui-datepicker-buttonpane button { float: left; }
|
539 |
-
.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current { float:right; }
|
540 |
-
.ui-datepicker-rtl .ui-datepicker-group { float:right; }
|
541 |
-
.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
|
542 |
-
.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
|
543 |
-
|
544 |
-
/* IE6 IFRAME FIX (taken from datepicker 1.5.3 */
|
545 |
-
.ui-datepicker-cover {
|
546 |
-
display: none; /*sorry for IE5*/
|
547 |
-
display/**/: block; /*sorry for IE5*/
|
548 |
-
position: absolute; /*must have*/
|
549 |
-
z-index: -1; /*must have*/
|
550 |
-
filter: mask(); /*must have*/
|
551 |
-
top: -4px; /*must have*/
|
552 |
-
left: -4px; /*must have*/
|
553 |
-
width: 200px; /*must have*/
|
554 |
-
height: 200px; /*must have*/
|
555 |
-
}/*!
|
556 |
-
* jQuery UI Progressbar 1.8.20
|
557 |
-
*
|
558 |
-
* Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
|
559 |
-
* Dual licensed under the MIT or GPL Version 2 licenses.
|
560 |
-
* http://jquery.org/license
|
561 |
-
*
|
562 |
-
* http://docs.jquery.com/UI/Progressbar#theming
|
563 |
-
*/
|
564 |
-
.ui-progressbar { height:2em; text-align: left; overflow: hidden; }
|
565 |
-
.ui-progressbar .ui-progressbar-value {margin: -1px; height:100%; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
css/style.css
DELETED
@@ -1,105 +0,0 @@
|
|
1 |
-
.form-builder{font-size:11px;width:100%;min-width:780px;}
|
2 |
-
.clearer{clear:both;}
|
3 |
-
.column{float:left;}
|
4 |
-
.columnr{float:right;}
|
5 |
-
.ctrlsColumn{width:380px;}
|
6 |
-
.dashboardColumn{ width:calc(100% - 400px); }
|
7 |
-
.width50{width:48%}
|
8 |
-
.width20{width:24%}
|
9 |
-
.width40{width:40%}
|
10 |
-
.width30{width:30%}
|
11 |
-
.padding10{padding:10px;}
|
12 |
-
.button, .form-builder .button{float:left;margin:5px 15px;}
|
13 |
-
.button.n span{color:#AED0EA}
|
14 |
-
#tabs{height:650px;width:100%;overflow-y:auto;}
|
15 |
-
#fbuilder{height:640px;overflow:auto;position:relative;}
|
16 |
-
#fbuilder .fields{border:1px solid transparent;padding:3px 10px 14px 10px;margin:5px 0px;display:block;position:relative}
|
17 |
-
#fbuilder .fields .arrow{position:absolute;left:-15px;top:20px;display:none}
|
18 |
-
#fbuilder .fields .remove{position:absolute;bottom:0;right:0;display:none;background-color:#fff;cursor:pointer}
|
19 |
-
#fbuilder .fields .copy{position:absolute;bottom:0;right:20px;display:none;background-color:#fff;cursor:pointer}
|
20 |
-
#fbuilder legend{ border:1px solid rgba(222,222,222,.75); background:#FFF; margin-left:5px; padding: 0 5px; }
|
21 |
-
#fbuilder .fcontainer{ border:1px solid rgba(222,222,222,.75); min-height:67px; }
|
22 |
-
.groupBox,
|
23 |
-
.dependenciesBox,
|
24 |
-
.choicesSet{border:1px dashed #888;margin:10px 0px;padding:5px}
|
25 |
-
.choicesEdit input[type=text]{width:120px;}
|
26 |
-
.choicesEdit,.choicesEditDep{position:relative;}
|
27 |
-
.choicesSet .t{margin-left:18px;width:115px;float:left}
|
28 |
-
.addComplexRule{cursor:pointer;}
|
29 |
-
.cf_dependence_rule{width:230px;}
|
30 |
-
.choicesEdit .choice_down{position:absolute;top:5px;left:255px;cursor:pointer;}
|
31 |
-
.choicesEdit .choice_up{position:absolute;top:5px;left:266px;cursor:pointer;}
|
32 |
-
.addDep,
|
33 |
-
.choicesEdit .choice_add{position:absolute;top:5px;left:278px;cursor:pointer;}
|
34 |
-
.removeDep,
|
35 |
-
.choicesEdit .choice_remove{position:absolute;top:5px;left:293px;cursor:pointer;}
|
36 |
-
.choicesEditDep .choice_addDep{position:absolute;top:5px;left:278px;cursor:pointer;}
|
37 |
-
.choicesEditDep .choice_removeDep{position:absolute;top:5px;left:293px;cursor:pointer;}
|
38 |
-
.calc_dependent{width:150px;}
|
39 |
-
.choicesEditDep select{width:170px;}
|
40 |
-
.addDep,
|
41 |
-
.ui-widget-content .choice_addDep.ui-icon {background-image: url(cupertino/images/ui-icons_2e83ff_256x240.png); }
|
42 |
-
.removeDep,
|
43 |
-
.ui-widget-content .choice_removeDep.ui-icon {background-image: url(cupertino/images/ui-icons_2e83ff_256x240.png); }
|
44 |
-
.addDep, .removeDep{float:right;}
|
45 |
-
.cf_dependence_field{width:150px;}
|
46 |
-
.showHideDependencies,.dep{float:right}
|
47 |
-
.choicesSet.hide {display:block !important;visibility: visible !important;}
|
48 |
-
.choicesSet.hide .choicesEditDep{display:none}
|
49 |
-
.choicesSet.show .choicesEditDep{display:block}
|
50 |
-
a.helpfbuilder.dep{font-size:100%;padding-left:10px}
|
51 |
-
input [disabled] {background-color: #f00;}
|
52 |
-
input [readonly] {background-color: #f00;}
|
53 |
-
#fbuilder .fields.ui-selected{background-color:#DFEFFF;border:1px solid #C2D7EF}
|
54 |
-
#fbuilder .fields.ui-selected .arrow,#fbuilder .fields.ui-selected>.remove,#fbuilder .fields.ui-selected>.copy{display:inline}
|
55 |
-
#fbuilder .fields.fmark,
|
56 |
-
#fbuilder .fields.ui-over{border:1px dashed #888;}
|
57 |
-
|
58 |
-
#fbuilder .fform{border:1px solid transparent;padding:10px 10px 20px 10px;margin:5px 0px;display:block;position:relative}
|
59 |
-
#fbuilder .fform .arrow{position:absolute;left:-15px;top:20px;display:none}
|
60 |
-
#fbuilder .fform.ui-selected{background-color:#E7FFCF;border:1px solid #C2EF95}
|
61 |
-
#fbuilder .fform.ui-selected .arrow{display:inline}
|
62 |
-
#fbuilder .fform.ui-over{border:1px dashed #888;}
|
63 |
-
#fbuilder .fform h1{margin:5px 0px;padding:0px;}
|
64 |
-
input.disabled {background: #fff;color: #888;cursor: default;}
|
65 |
-
label1{display:inline}
|
66 |
-
input.small, select.small, textarea.small, .small{width:25%}
|
67 |
-
input.medium, select.medium, textarea.medium, .medium{width:50%}
|
68 |
-
input.large, select.large, textarea.large, .large{width:100%;box-sizing: border-box;-webkit-box-sizing:border-box;-moz-box-sizing: border-box;}
|
69 |
-
textarea {resize: none}
|
70 |
-
.one_column{}
|
71 |
-
.two_column{float:left;width:48%}
|
72 |
-
.three_column{float:left;width:30%}
|
73 |
-
.side_by_side{float:left;}
|
74 |
-
.top_aligned .fields label{}
|
75 |
-
.top_aligned .fields .dfield{}
|
76 |
-
.left_aligned .fields label{float:left;width:31%}
|
77 |
-
.left_aligned .fields .dfield{float:left;width:65%;}
|
78 |
-
.right_aligned .fields label{float:left;width:31%;text-align:right;padding:3px 3px 0px 0px}
|
79 |
-
.right_aligned .fields .dfield{float:left;width:65%}
|
80 |
-
#tabs span.uh,
|
81 |
-
#fbuilder span.uh{display:block;font-size:80%;clear:both}
|
82 |
-
#fbuilder .section_break{border-top:1px dotted #555;clear:both}
|
83 |
-
|
84 |
-
#fbuilder .uh_phone{float:left;margin:0px 5px;font-size:80%;text-align:center;position: relative;}
|
85 |
-
#fbuilder .uh_phone input{text-align:center;font-size:100%;}
|
86 |
-
#fbuilder .uh_phone div.cpefb_error{display:block;white-space:nowrap;width:400px}
|
87 |
-
|
88 |
-
.eq_btn{min-width:45px;}
|
89 |
-
.cf_dependence_value{ width:20%; }
|
90 |
-
#sEq{resize:vertical; min-height:70px;}
|
91 |
-
#fCalculated{
|
92 |
-
background: url("cupertino/images/ui-bg_glass_80_eebd4d_1x400.png") repeat-x scroll 50% 50% #EEBD4D;
|
93 |
-
border: 1px solid #D0771D;
|
94 |
-
color: #643F0D;
|
95 |
-
font-weight: bold;
|
96 |
-
}
|
97 |
-
a.helpfbuilder{font-size:80%;text-decoration:underline;color:#00f;cursor:pointer;}
|
98 |
-
.working_dates input[type='checkbox']{width:8%}
|
99 |
-
.form-builder .ui-button-text {
|
100 |
-
display: block !important;
|
101 |
-
}
|
102 |
-
|
103 |
-
.form-builder-error-messages .error-text{ color: #FF0000; border: 1px solid #FF0000; margin-bottom: 10px; padding:5px; }
|
104 |
-
|
105 |
-
.form-builder #tabs label{ font-size:12px !important; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
css/stylepublic.css
DELETED
@@ -1,80 +0,0 @@
|
|
1 |
-
.clearer{clear:both;}
|
2 |
-
|
3 |
-
#fbuilder{}
|
4 |
-
#fbuilder .fields,#fbuilder .fform{padding:5px 0px;}
|
5 |
-
#fbuilder .fform h1{margin:5px 0px;padding:0px;}
|
6 |
-
|
7 |
-
#fbuilder .small{width:25% !important;padding-left:0;padding-right:0;}
|
8 |
-
#fbuilder .medium{width:50% !important;padding-left:0;padding-right:0;}
|
9 |
-
#fbuilder .large{width:100% !important;padding-left:0;padding-right:0;}
|
10 |
-
|
11 |
-
@media screen and (min-width: 740px){
|
12 |
-
#fbuilder .fields.column2{float:left;width:49.9%;}
|
13 |
-
#fbuilder .fields.column3{float:left;width:33.3%;}
|
14 |
-
#fbuilder .fields.column4{float:left;width:24.9%;}
|
15 |
-
}
|
16 |
-
|
17 |
-
@media screen and (max-width: 640px){
|
18 |
-
#fbuilder .small,
|
19 |
-
#fbuilder .medium{width:100% !important;}
|
20 |
-
}
|
21 |
-
|
22 |
-
#fbuilder .one_column{}
|
23 |
-
#fbuilder .two_column{float:left;width:48%;}
|
24 |
-
#fbuilder .three_column{float:left;width:30%;}
|
25 |
-
#fbuilder .side_by_side{float:left;}
|
26 |
-
|
27 |
-
|
28 |
-
#fbuilder .dfield{position:relative;}
|
29 |
-
#fbuilder .top_aligned .fields label{}
|
30 |
-
#fbuilder .top_aligned .fields .dfield{}
|
31 |
-
#fbuilder .left_aligned .fields label{float:left;width:31%;}
|
32 |
-
#fbuilder .left_aligned .fields .dfield{float:left;width:65%;}
|
33 |
-
#fbuilder .right_aligned .fields label{float:left;width:31%;text-align:right;padding:3px 3px 0px 0px;}
|
34 |
-
#fbuilder .right_aligned .fields .dfield{float:left;width:65%;}
|
35 |
-
#fbuilder .right_aligned .fields .dfield label{text-align:left;}
|
36 |
-
|
37 |
-
#fbuilder .one_column label,
|
38 |
-
#fbuilder .two_column label,
|
39 |
-
#fbuilder .three_column label,
|
40 |
-
#fbuilder .side_by_side label{ width:100% !important; }
|
41 |
-
|
42 |
-
#fbuilder .left_aligned .section_breaks.fields label,
|
43 |
-
#fbuilder .left_aligned .comment_area.fields label,
|
44 |
-
#fbuilder .right_aligned .section_breaks.fields label,
|
45 |
-
#fbuilder .right_aligned .comment_area.fields label{width:100%;clear:both;}
|
46 |
-
|
47 |
-
#fbuilder .cpefb_error{border1:1px solid red;}
|
48 |
-
#fbuilder .top_aligned .fields label.cpefb_error,.left_aligned .fields label.cpefb_error,.right_aligned .fields label.cpefb_error{display:block;border:0px;color:#f00;float:none;}
|
49 |
-
|
50 |
-
#fbuilder div.cpefb_error{background:#FDF9E5;border:1px solid #f00;opacity:0.9;margin-top:7px;position:relative;padding:0px 5px;z-index:1000;}
|
51 |
-
#fbuilder div.cpefb_error:after{content:"";position:absolute;background:transparent url("../images/tooltop.gif") no-repeat scroll 10px center;color:red;font-weight:bold;height:8px;width:100%;top:-8px;left:0px;z-index:1000;}
|
52 |
-
|
53 |
-
#fbuilder .ui-datepicker{ z-index:9999 !important;}
|
54 |
-
#fbuilder span.uh{display:block;font-size:80%;clear:both;}
|
55 |
-
#fbuilder .section_break{border-top:1px dotted #555;clear:both;}
|
56 |
-
|
57 |
-
#fbuilder .uh_phone{float:left;margin:0px 5px;font-size:80%;text-align:center;position:relative;}
|
58 |
-
#fbuilder .uh_phone input{text-align:center;font-size:100%;}
|
59 |
-
#fbuilder .uh_phone div.cpefb_error{white-space:nowrap;}
|
60 |
-
#fbuilder .cpp_form { text-align:left;}
|
61 |
-
#fbuilder .pbreak{display:none;}
|
62 |
-
#fbuilder .pbreak.pb0{display:block;}
|
63 |
-
#fbuilder .pbreak .pbPrevious,.pbreak .pbNext,.pbSubmit{background:#ccc;color:#000;display:block;float:left;cursor:pointer;margin:10px 10px 0px 0px;padding:5px 20px;}
|
64 |
-
#fbuilder .pbreak.pb0 .pbPrevious{display:none;}
|
65 |
-
#fbuilder .pbreak.pbEnd .pbNext{display:none;}
|
66 |
-
#fbuilder .ignore{border:5px solid black;}
|
67 |
-
#fbuilder fieldset{border:1px solid #ccc;padding:10px;}
|
68 |
-
#fbuilder legend{border:1px solid #ccc;padding:5px 10px;}
|
69 |
-
#fbuilder .cpcaptchalayer,.cp_subbtn{display:none;}
|
70 |
-
#fbuilder .captcha img{ cursor:pointer; }
|
71 |
-
|
72 |
-
#fbuilder input[type='radio'],#fbuilder input[type='checkbox']{width:auto;}
|
73 |
-
.ui-tooltip.uh-tooltip{width:250px;font-size:10px;font-weight:normal;padding:5px;}
|
74 |
-
#fbuilder input[type="checkbox"]{-webkit-appearance:checkbox!important;}
|
75 |
-
#fbuilder input[type="radio"]{-webkit-appearance:radio!important;}
|
76 |
-
|
77 |
-
#fbuilder .cff-summary-title:after{ content: ': '; }
|
78 |
-
|
79 |
-
#fbuilder .hide{ display:none; }
|
80 |
-
#fbuilder .clear{ clear:both; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
help/cssstyles.html
ADDED
@@ -0,0 +1,97 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<h1>Predefined CSS Styles</h1>
|
2 |
+
<p>This page show screenshots of the CSS styles available for the calendar. The CSS styles can be selected from the settings field "<strong>CSS Style</strong>" located in the <strong>box named "CP Multi View Calendar" below the page/post edition area</strong>. </p>
|
3 |
+
|
4 |
+
<p><strong>Important:</strong> Note that the free version includes only the CSS Style "<strong>Cupertino</strong>". For getting the other CSS styles you should acquire the <a href="http://wordpress.dwbooster.com/calendars/cp-multi-view-calendar"><strong>pro version at this page<strong></a></a>.</a>
|
5 |
+
|
6 |
+
<hr size="1" />
|
7 |
+
<h3 style="background-color:#555555;color:#efefef;padding:10px;">01 - Cupertino (included in both free and pro versions)</h3>
|
8 |
+
<a href="http://wordpress.dwbooster.com/calendars/cp-multi-view-calendar" target="_blank"><img src="<?php echo plugins_url('/imgstyles/cupertino.png', __FILE__); ?>" width="660" height="425" border="0" /></a>
|
9 |
+
|
10 |
+
<hr size="1" />
|
11 |
+
<h3 style="background-color:#555555;color:#efefef;padding:10px;">02 - UI Lightness (included in pro version only)</h3>
|
12 |
+
<a href="http://wordpress.dwbooster.com/calendars/cp-multi-view-calendar" target="_blank"><img src="<?php echo plugins_url('/imgstyles/ui-lightness.png', __FILE__); ?>" width="660" height="425" border="0" /></a>
|
13 |
+
|
14 |
+
<hr size="1" />
|
15 |
+
<h3 style="background-color:#555555;color:#efefef;padding:10px;">03 - UI Darkness (included in pro version only)</h3>
|
16 |
+
<a href="http://wordpress.dwbooster.com/calendars/cp-multi-view-calendar" target="_blank"><img src="<?php echo plugins_url('/imgstyles/ui-darkness.png', __FILE__); ?>" width="660" height="425" border="0" /></a>
|
17 |
+
|
18 |
+
<hr size="1" />
|
19 |
+
<h3 style="background-color:#555555;color:#efefef;padding:10px;">04 - Trontastic (included in pro version only)</h3>
|
20 |
+
<a href="http://wordpress.dwbooster.com/calendars/cp-multi-view-calendar" target="_blank"><img src="<?php echo plugins_url('/imgstyles/trontastic.png', __FILE__); ?>" width="660" height="425" border="0" /></a>
|
21 |
+
|
22 |
+
<hr size="1" />
|
23 |
+
<h3 style="background-color:#555555;color:#efefef;padding:10px;">05 - Swanky Purse (included in pro version only)</h3>
|
24 |
+
<a href="http://wordpress.dwbooster.com/calendars/cp-multi-view-calendar" target="_blank"><img src="<?php echo plugins_url('/imgstyles/swanky-purse.png', __FILE__); ?>" width="660" height="425" border="0" /></a>
|
25 |
+
|
26 |
+
<hr size="1" />
|
27 |
+
<h3 style="background-color:#555555;color:#efefef;padding:10px;">06 - Sunny (included in pro version only)</h3>
|
28 |
+
<a href="http://wordpress.dwbooster.com/calendars/cp-multi-view-calendar" target="_blank"><img src="<?php echo plugins_url('/imgstyles/sunny.png', __FILE__); ?>" width="660" height="425" border="0" /></a>
|
29 |
+
|
30 |
+
<hr size="1" />
|
31 |
+
<h3 style="background-color:#555555;color:#efefef;padding:10px;">07 - Start (included in pro version only)</h3>
|
32 |
+
<a href="http://wordpress.dwbooster.com/calendars/cp-multi-view-calendar" target="_blank"><img src="<?php echo plugins_url('/imgstyles/start.png', __FILE__); ?>" width="660" height="425" border="0" /></a>
|
33 |
+
|
34 |
+
<hr size="1" />
|
35 |
+
<h3 style="background-color:#555555;color:#efefef;padding:10px;">08 - South Street (included in pro version only)</h3>
|
36 |
+
<a href="http://wordpress.dwbooster.com/calendars/cp-multi-view-calendar" target="_blank"><img src="<?php echo plugins_url('/imgstyles/south-street.png', __FILE__); ?>" width="660" height="425" border="0" /></a>
|
37 |
+
|
38 |
+
<hr size="1" />
|
39 |
+
<h3 style="background-color:#555555;color:#efefef;padding:10px;">09 - Smoothness (included in pro version only)</h3>
|
40 |
+
<a href="http://wordpress.dwbooster.com/calendars/cp-multi-view-calendar" target="_blank"><img src="<?php echo plugins_url('/imgstyles/smoothness.png', __FILE__); ?>" width="660" height="425" border="0" /></a>
|
41 |
+
|
42 |
+
<hr size="1" />
|
43 |
+
<h3 style="background-color:#555555;color:#efefef;padding:10px;">10 - Redmond (included in pro version only)</h3>
|
44 |
+
<a href="http://wordpress.dwbooster.com/calendars/cp-multi-view-calendar" target="_blank"><img src="<?php echo plugins_url('/imgstyles/redmond.png', __FILE__); ?>" width="660" height="425" border="0" /></a>
|
45 |
+
|
46 |
+
<hr size="1" />
|
47 |
+
<h3 style="background-color:#555555;color:#efefef;padding:10px;">11 - Pepper Grinder (included in pro version only)</h3>
|
48 |
+
<a href="http://wordpress.dwbooster.com/calendars/cp-multi-view-calendar" target="_blank"><img src="<?php echo plugins_url('/imgstyles/pepper-grinder.png', __FILE__); ?>" width="660" height="425" border="0" /></a>
|
49 |
+
|
50 |
+
<hr size="1" />
|
51 |
+
<h3 style="background-color:#555555;color:#efefef;padding:10px;">12 - Overcast (included in pro version only)</h3>
|
52 |
+
<a href="http://wordpress.dwbooster.com/calendars/cp-multi-view-calendar" target="_blank"><img src="<?php echo plugins_url('/imgstyles/overcast.png', __FILE__); ?>" width="660" height="425" border="0" /></a>
|
53 |
+
|
54 |
+
<hr size="1" />
|
55 |
+
<h3 style="background-color:#555555;color:#efefef;padding:10px;">13 - Mint Choc (included in pro version only)</h3>
|
56 |
+
<a href="http://wordpress.dwbooster.com/calendars/cp-multi-view-calendar" target="_blank"><img src="<?php echo plugins_url('/imgstyles/mint-choc.png', __FILE__); ?>" width="660" height="425" border="0" /></a>
|
57 |
+
|
58 |
+
<hr size="1" />
|
59 |
+
<h3 style="background-color:#555555;color:#efefef;padding:10px;">14 - Le Frog (included in pro version only)</h3>
|
60 |
+
<a href="http://wordpress.dwbooster.com/calendars/cp-multi-view-calendar" target="_blank"><img src="<?php echo plugins_url('/imgstyles/le-frog.png', __FILE__); ?>" width="660" height="425" border="0" /></a>
|
61 |
+
|
62 |
+
<hr size="1" />
|
63 |
+
<h3 style="background-color:#555555;color:#efefef;padding:10px;">15 - Humanity (included in pro version only)</h3>
|
64 |
+
<a href="http://wordpress.dwbooster.com/calendars/cp-multi-view-calendar" target="_blank"><img src="<?php echo plugins_url('/imgstyles/humanity.png', __FILE__); ?>" width="660" height="425" border="0" /></a>
|
65 |
+
|
66 |
+
<hr size="1" />
|
67 |
+
<h3 style="background-color:#555555;color:#efefef;padding:10px;">16 - Hot Sneaks (included in pro version only)</h3>
|
68 |
+
<a href="http://wordpress.dwbooster.com/calendars/cp-multi-view-calendar" target="_blank"><img src="<?php echo plugins_url('/imgstyles/hot-sneaks.png', __FILE__); ?>" width="660" height="425" border="0" /></a>
|
69 |
+
|
70 |
+
<hr size="1" />
|
71 |
+
<h3 style="background-color:#555555;color:#efefef;padding:10px;">17 - Flick (included in pro version only)</h3>
|
72 |
+
<a href="http://wordpress.dwbooster.com/calendars/cp-multi-view-calendar" target="_blank"><img src="<?php echo plugins_url('/imgstyles/flick.png', __FILE__); ?>" width="660" height="425" border="0" /></a>
|
73 |
+
|
74 |
+
<hr size="1" />
|
75 |
+
<h3 style="background-color:#555555;color:#efefef;padding:10px;">18 - Excite Bike (included in pro version only)</h3>
|
76 |
+
<a href="http://wordpress.dwbooster.com/calendars/cp-multi-view-calendar" target="_blank"><img src="<?php echo plugins_url('/imgstyles/excite-bike.png', __FILE__); ?>" width="660" height="425" border="0" /></a>
|
77 |
+
|
78 |
+
<hr size="1" />
|
79 |
+
<h3 style="background-color:#555555;color:#efefef;padding:10px;">19 - Eggplant (included in pro version only)</h3>
|
80 |
+
<a href="http://wordpress.dwbooster.com/calendars/cp-multi-view-calendar" target="_blank"><img src="<?php echo plugins_url('/imgstyles/eggplant.png', __FILE__); ?>" width="660" height="425" border="0" /></a>
|
81 |
+
|
82 |
+
<hr size="1" />
|
83 |
+
<h3 style="background-color:#555555;color:#efefef;padding:10px;">20 - Dark Hive (included in pro version only)</h3>
|
84 |
+
<a href="http://wordpress.dwbooster.com/calendars/cp-multi-view-calendar" target="_blank"><img src="<?php echo plugins_url('/imgstyles/dark-hive.png', __FILE__); ?>" width="660" height="425" border="0" /></a>
|
85 |
+
|
86 |
+
<hr size="1" />
|
87 |
+
<h3 style="background-color:#555555;color:#efefef;padding:10px;">21 - Blitzer (included in pro version only)</h3>
|
88 |
+
<a href="http://wordpress.dwbooster.com/calendars/cp-multi-view-calendar" target="_blank"><img src="<?php echo plugins_url('/imgstyles/blitzer.png', __FILE__); ?>" width="660" height="425" border="0" /></a>
|
89 |
+
|
90 |
+
<hr size="1" />
|
91 |
+
<h3 style="background-color:#555555;color:#efefef;padding:10px;">22 - Black Tie (included in pro version only)</h3>
|
92 |
+
<a href="http://wordpress.dwbooster.com/calendars/cp-multi-view-calendar" target="_blank"><img src="<?php echo plugins_url('/imgstyles/black-tie.png', __FILE__); ?>" width="660" height="425" border="0" /></a>
|
93 |
+
|
94 |
+
<hr size="1" />
|
95 |
+
<h3 style="background-color:#555555;color:#efefef;padding:10px;">23 - Vader (included in pro version only)</h3>
|
96 |
+
<a href="http://wordpress.dwbooster.com/calendars/cp-multi-view-calendar" target="_blank"><img src="<?php echo plugins_url('/imgstyles/vader.png', __FILE__); ?>" width="660" height="425" border="0" /></a>
|
97 |
+
|
help/imgsamples/01.png
ADDED
Binary file
|
help/imgsamples/02.png
ADDED
Binary file
|
help/imgsamples/03.png
ADDED
Binary file
|
help/imgsamples/04.png
ADDED
Binary file
|
help/imgsamples/05.png
ADDED
Binary file
|
help/imgsamples/06.png
ADDED
Binary file
|
help/imgsamples/07.png
ADDED
Binary file
|
help/imgsamples/08.png
ADDED
Binary file
|
help/imgsamples/09.png
ADDED
Binary file
|
help/imgsamples/10.png
ADDED
Binary file
|
help/imgsamples/11.png
ADDED
Binary file
|
help/imgsamples/12.png
ADDED
Binary file
|
help/imgsamples/13.png
ADDED
Binary file
|
help/imgsamples/14.png
ADDED
Binary file
|
help/imgsamples/15.png
ADDED
Binary file
|
help/imgsamples/16.png
ADDED
Binary file
|
help/imgsamples/17.png
ADDED
Binary file
|
help/imgsamples/18.png
ADDED
Binary file
|
help/imgsamples/19.png
ADDED
Binary file
|
help/imgsamples/20.png
ADDED
Binary file
|
help/imgstyles/black-tie.png
ADDED
Binary file
|
help/imgstyles/blitzer.png
ADDED
Binary file
|
help/imgstyles/cupertino.png
ADDED
Binary file
|
help/imgstyles/dark-hive.png
ADDED
Binary file
|
help/imgstyles/eggplant.png
ADDED
Binary file
|
help/imgstyles/excite-bike.png
ADDED
Binary file
|
help/imgstyles/flick.png
ADDED
Binary file
|
help/imgstyles/hot-sneaks.png
ADDED
Binary file
|
help/imgstyles/humanity.png
ADDED
Binary file
|
help/imgstyles/le-frog.png
ADDED
Binary file
|
help/imgstyles/mint-choc.png
ADDED
Binary file
|
help/imgstyles/overcast.png
ADDED
Binary file
|
help/imgstyles/pepper-grinder.png
ADDED
Binary file
|
help/imgstyles/redmond.png
ADDED
Binary file
|
help/imgstyles/smoothness.png
ADDED
Binary file
|
help/imgstyles/south-street.png
ADDED
Binary file
|
help/imgstyles/start.png
ADDED
Binary file
|
help/imgstyles/sunny.png
ADDED
Binary file
|
help/imgstyles/swanky-purse.png
ADDED
Binary file
|
help/imgstyles/trontastic.png
ADDED
Binary file
|
help/imgstyles/ui-darkness.png
ADDED
Binary file
|
help/imgstyles/ui-lightness.png
ADDED
Binary file
|
help/imgstyles/vader.png
ADDED
Binary file
|
help/samples.html
ADDED
@@ -0,0 +1,82 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<h1>Sample Views and Configuration Instructions</h1>
|
2 |
+
<p>The following images show sample configurations of this calendar. <strong>Click the images</strong> for a live sample and instructions for the configuration.</p>
|
3 |
+
|
4 |
+
<hr size="1" />
|
5 |
+
<h3 style="background-color:#555555;color:#efefef;padding:10px;">01 - View day only</h3>
|
6 |
+
<a href="http://wordpress.dwbooster.com/demos/multi-view/01-view-day-only.html" target="_blank"><img src="<?php echo plugins_url('/imgsamples/01.png', __FILE__); ?>" border="0" /></a>
|
7 |
+
|
8 |
+
<hr size="1" />
|
9 |
+
<h3 style="background-color:#555555;color:#efefef;padding:10px;">02 - View week only</h3>
|
10 |
+
<a href="http://wordpress.dwbooster.com/demos/multi-view/02-view-week-only.html" target="_blank"><img src="<?php echo plugins_url('/imgsamples/02.png', __FILE__); ?>" border="0" /></a>
|
11 |
+
|
12 |
+
<hr size="1" />
|
13 |
+
<h3 style="background-color:#555555;color:#efefef;padding:10px;">03 - View month only</h3>
|
14 |
+
<a href="http://wordpress.dwbooster.com/demos/multi-view/03-view-month-only.html" target="_blank"><img src="<?php echo plugins_url('/imgsamples/03.png', __FILE__); ?>" border="0" /></a>
|
15 |
+
|
16 |
+
<hr size="1" />
|
17 |
+
<h3 style="background-color:#555555;color:#efefef;padding:10px;">04 - View n-Months only</h3>
|
18 |
+
<a href="http://wordpress.dwbooster.com/demos/multi-view/04-view-n-months-only.html" target="_blank"><img src="<?php echo plugins_url('/imgsamples/04.png', __FILE__); ?>" border="0" /></a>
|
19 |
+
|
20 |
+
<hr size="1" />
|
21 |
+
<h3 style="background-color:#555555;color:#efefef;padding:10px;">05 - Small calendar</h3>
|
22 |
+
<a href="http://wordpress.dwbooster.com/demos/multi-view/05-small-calendar.html" target="_blank"><img src="<?php echo plugins_url('/imgsamples/05.png', __FILE__); ?>" border="0" /></a>
|
23 |
+
|
24 |
+
<hr size="1" />
|
25 |
+
<h3 style="background-color:#555555;color:#efefef;padding:10px;">06 - n-Month view, only one month, large view</h3>
|
26 |
+
<a href="http://wordpress.dwbooster.com/demos/multi-view/06-one-month-large-view.html" target="_blank"><img src="<?php echo plugins_url('/imgsamples/06.png', __FILE__); ?>" border="0" /></a>
|
27 |
+
|
28 |
+
<hr size="1" />
|
29 |
+
<h3 style="background-color:#555555;color:#efefef;padding:10px;">07 - n-Month view with 2 months using all the width</h3>
|
30 |
+
<a href="http://wordpress.dwbooster.com/demos/multi-view/07-two-months-using-all-the-width.html" target="_blank"><img src="<?php echo plugins_url('/imgsamples/07.png', __FILE__); ?>" border="0" /></a>
|
31 |
+
|
32 |
+
<hr size="1" />
|
33 |
+
<h3 style="background-color:#555555;color:#efefef;padding:10px;">08 - n-Month view, 3 months with vertical align</h3>
|
34 |
+
<a href="http://wordpress.dwbooster.com/demos/multi-view/08-various-months-with-vertical-align.html" target="_blank"><img src="<?php echo plugins_url('/imgsamples/08.png', __FILE__); ?>" border="0" /></a>
|
35 |
+
|
36 |
+
<hr size="1" />
|
37 |
+
<h3 style="background-color:#555555;color:#efefef;padding:10px;">09 - Tooltip displayed on month,week and day view</h3>
|
38 |
+
<a href="http://wordpress.dwbooster.com/demos/multi-view/09-tooltip-displayed.html" target="_blank"><img src="<?php echo plugins_url('/imgsamples/09.png', __FILE__); ?>" border="0" /></a>
|
39 |
+
|
40 |
+
<hr size="1" />
|
41 |
+
<h3 style="background-color:#555555;color:#efefef;padding:10px;">10 - Lighter view for events and center align</h3>
|
42 |
+
<a href="http://wordpress.dwbooster.com/demos/multi-view/10-lighter-view-center-align.html" target="_blank"><img src="<?php echo plugins_url('/imgsamples/10.png', __FILE__); ?>" border="0" /></a>
|
43 |
+
|
44 |
+
<hr size="1" />
|
45 |
+
<h3 style="background-color:#555555;color:#efefef;padding:10px;">11 - Multi-line event description</h3>
|
46 |
+
<a href="http://wordpress.dwbooster.com/demos/multi-view/11-multi-line-event-description.html" target="_blank"><img src="<?php echo plugins_url('/imgsamples/11.png', __FILE__); ?>" border="0" /></a>
|
47 |
+
|
48 |
+
<hr size="1" />
|
49 |
+
<h3 style="background-color:#555555;color:#efefef;padding:10px;">12 - Images and HTML formatting in tooltip</h3>
|
50 |
+
<a href="http://wordpress.dwbooster.com/demos/multi-view/12-images-and-html-formatting-in-tooltip.html" target="_blank"><img src="<?php echo plugins_url('/imgsamples/12.png', __FILE__); ?>" border="0" /></a>
|
51 |
+
|
52 |
+
<hr size="1" />
|
53 |
+
<h3 style="background-color:#555555;color:#efefef;padding:10px;">13 - Images directly on the calendar cells</h3>
|
54 |
+
<a href="http://wordpress.dwbooster.com/demos/multi-view/13-images-directly-on-the-calendar-cells.html" target="_blank"><img src="<?php echo plugins_url('/imgsamples/13.png', __FILE__); ?>" border="0" /></a>
|
55 |
+
|
56 |
+
<hr size="1" />
|
57 |
+
<h3 style="background-color:#555555;color:#efefef;padding:10px;">14 - Show only from Monday to Friday</h3>
|
58 |
+
<a href="http://wordpress.dwbooster.com/demos/multi-view/14-show-only-from-monday-to-friday.html" target="_blank"><img src="<?php echo plugins_url('/imgsamples/14.png', __FILE__); ?>" border="0" /></a>
|
59 |
+
|
60 |
+
<hr size="1" />
|
61 |
+
<h3 style="background-color:#555555;color:#efefef;padding:10px;">15 - Using 12 or 24 hour clock</h3>
|
62 |
+
<a href="http://wordpress.dwbooster.com/demos/multi-view/15-using-12-or-24-hour-clock.html" target="_blank"><img src="<?php echo plugins_url('/imgsamples/15.png', __FILE__); ?>" border="0" /></a>
|
63 |
+
|
64 |
+
<hr size="1" />
|
65 |
+
<h3 style="background-color:#555555;color:#efefef;padding:10px;">16 - Showing the n-Days view</h3>
|
66 |
+
<a href="http://wordpress.dwbooster.com/demos/multi-view/16-n-days-view.html" target="_blank"><img src="<?php echo plugins_url('/imgsamples/16.png', __FILE__); ?>" border="0" /></a>
|
67 |
+
|
68 |
+
<hr size="1" />
|
69 |
+
<h3 style="background-color:#555555;color:#efefef;padding:10px;">17 - Selecting hours to be shown</h3>
|
70 |
+
<a href="http://wordpress.dwbooster.com/demos/multi-view/17-selecting-hours-to-be-shown.html" target="_blank"><img src="<?php echo plugins_url('/imgsamples/17.png', __FILE__); ?>" border="0" /></a>
|
71 |
+
|
72 |
+
<hr size="1" />
|
73 |
+
<h3 style="background-color:#555555;color:#efefef;padding:10px;">18 - Using drop-down lists for location and title</h3>
|
74 |
+
<a href="http://wordpress.dwbooster.com/demos/multi-view/18-lists-for-location-and-title.html" target="_blank"><img src="<?php echo plugins_url('/imgsamples/18.png', __FILE__); ?>" border="0" /></a>
|
75 |
+
|
76 |
+
<hr size="1" />
|
77 |
+
<h3 style="background-color:#555555;color:#efefef;padding:10px;">19 - Multi-column day view, location or title</h3>
|
78 |
+
<a href="http://wordpress.dwbooster.com/demos/multi-view/19-multi-column-day-view.html" target="_blank"><img src="<?php echo plugins_url('/imgsamples/19.png', __FILE__); ?>" border="0" /></a>
|
79 |
+
|
80 |
+
<hr size="1" />
|
81 |
+
<h3 style="background-color:#555555;color:#efefef;padding:10px;">20 - Day view with location & title grid</h3>
|
82 |
+
<a href="http://wordpress.dwbooster.com/demos/multi-view/20-day-view-with-location-title-grid.html" target="_blank"><img src="<?php echo plugins_url('/imgsamples/20.png', __FILE__); ?>" border="0" /></a>
|
images/blank.gif
DELETED
Binary file
|
images/colorpicker_background.png
DELETED
Binary file
|
images/colorpicker_hex.png
DELETED
Binary file
|
images/colorpicker_hsb_b.png
DELETED
Binary file
|
images/colorpicker_hsb_h.png
DELETED
Binary file
|
images/colorpicker_hsb_s.png
DELETED
Binary file
|
images/colorpicker_indic.gif
DELETED
Binary file
|
images/colorpicker_overlay.png
DELETED
Binary file
|
images/colorpicker_rgb_b.png
DELETED
Binary file
|
images/colorpicker_rgb_g.png
DELETED
Binary file
|
images/colorpicker_rgb_r.png
DELETED
Binary file
|
images/colorpicker_select.gif
DELETED
Binary file
|
images/colorpicker_submit.png
DELETED
Binary file
|
images/cp-apps.gif
ADDED
Binary file
|
images/cp_form.gif
DELETED
Binary file
|
images/custom_background.png
DELETED
Binary file
|
images/custom_hex.png
DELETED
Binary file
|
images/custom_hsb_b.png
DELETED
Binary file
|
images/custom_hsb_h.png
DELETED
Binary file
|
images/custom_hsb_s.png
DELETED
Binary file
|
images/custom_indic.gif
DELETED
Binary file
|
images/custom_rgb_b.png
DELETED
Binary file
|
images/custom_rgb_g.png
DELETED
Binary file
|
images/custom_rgb_r.png
DELETED
Binary file
|
images/custom_submit.png
DELETED
Binary file
|
images/loading.gif
DELETED
Binary file
|
images/recycle_bin.png
DELETED
Binary file
|
images/select.png
DELETED
Binary file
|
images/select2.png
DELETED
Binary file
|
images/slider.png
DELETED
Binary file
|
images/tooltop.gif
DELETED
Binary file
|
js/fbuilder-loader-admin.php
DELETED
@@ -1,83 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
header('Content-Type: application/x-javascript; charset=UTF-8');
|
3 |
-
?>
|
4 |
-
|
5 |
-
$fbuilderloadedflag = true;
|
6 |
-
|
7 |
-
fbuilderjQuery = (typeof fbuilderjQuery != 'undefined' ) ? fbuilderjQuery : jQuery;
|
8 |
-
fbuilderjQuery(function(){
|
9 |
-
(function($) {
|
10 |
-
// Namespace of fbuilder
|
11 |
-
$.fbuilder = $.fbuilder || {};
|
12 |
-
$.fbuilder[ 'objName' ] = 'fbuilderjQuery';
|
13 |
-
|
14 |
-
<?php
|
15 |
-
// Load Module files
|
16 |
-
try
|
17 |
-
{
|
18 |
-
$md = dir( dirname( __FILE__ )."/modules");
|
19 |
-
$modules_files = array();
|
20 |
-
while( false !== ( $entry = $md->read() ) )
|
21 |
-
{
|
22 |
-
if ( strlen( $entry ) > 3 && is_dir( $md->path.'/'.$entry ) )
|
23 |
-
{
|
24 |
-
if ( file_exists( $md->path.'/'.$entry.'/admin' ) )
|
25 |
-
{
|
26 |
-
$m = dir( $md->path.'/'.$entry.'/admin' );
|
27 |
-
while( false !== ( $mentry = $m->read() ) )
|
28 |
-
{
|
29 |
-
if( strlen( $mentry ) > 3 && strtolower( substr( $mentry, strlen( $mentry ) - 3 ) ) == '.js' )
|
30 |
-
{
|
31 |
-
$modules_files[] = $m->path.'/'.$mentry;
|
32 |
-
}
|
33 |
-
}
|
34 |
-
}
|
35 |
-
|
36 |
-
}
|
37 |
-
}
|
38 |
-
sort( $modules_files );
|
39 |
-
foreach( $modules_files as $file )
|
40 |
-
{
|
41 |
-
require $file;
|
42 |
-
}
|
43 |
-
}
|
44 |
-
catch (Exception $e)
|
45 |
-
{
|
46 |
-
// ignore the error
|
47 |
-
}
|
48 |
-
|
49 |
-
// Load Control files
|
50 |
-
require 'fbuilder-pro-admin.jquery.js';
|
51 |
-
try
|
52 |
-
{
|
53 |
-
$d = dir( dirname( __FILE__ )."/fields-admin" );
|
54 |
-
$controls_files = array();
|
55 |
-
while (false !== ($entry = $d->read()))
|
56 |
-
{
|
57 |
-
if (strlen($entry) > 3 && strtolower(substr($entry,strlen($entry)-3)) == '.js')
|
58 |
-
{
|
59 |
-
if (file_exists( $d->path.'/'.$entry ) )
|
60 |
-
{
|
61 |
-
$controls_files[] = $d->path.'/'.$entry;
|
62 |
-
}
|
63 |
-
}
|
64 |
-
}
|
65 |
-
sort( $controls_files );
|
66 |
-
foreach( $controls_files as $file )
|
67 |
-
{
|
68 |
-
require $file;
|
69 |
-
}
|
70 |
-
}
|
71 |
-
catch (Exception $e)
|
72 |
-
{
|
73 |
-
// ignore the error
|
74 |
-
}
|
75 |
-
|
76 |
-
?>
|
77 |
-
// Global events
|
78 |
-
$('[name="paypal_recurrent"]').change( function(){
|
79 |
-
if( $( this ).val() == 'field' ) $( '[name="paypal_recurrent_field"]' ).show();
|
80 |
-
else $( '[name="paypal_recurrent_field"]' ).hide();
|
81 |
-
} );
|
82 |
-
})(fbuilderjQuery);
|
83 |
-
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
js/fbuilder-loader-public.php
DELETED
@@ -1,90 +0,0 @@
|
|
1 |
-
<?php header('Content-Type: application/x-javascript; charset=UTF-8'); ?>
|
2 |
-
fbuilderjQuery = (typeof fbuilderjQuery != 'undefined' ) ? fbuilderjQuery : jQuery;
|
3 |
-
fbuilderjQuery(function(){
|
4 |
-
(function($) {
|
5 |
-
// Namespace of fbuilder
|
6 |
-
$.fbuilder = $.fbuilder || {};
|
7 |
-
$.fbuilder[ 'objName' ] = 'fbuilderjQuery';
|
8 |
-
|
9 |
-
<?php
|
10 |
-
// Load Module files
|
11 |
-
try
|
12 |
-
{
|
13 |
-
$md = dir( dirname( __FILE__ )."/modules" );
|
14 |
-
$modules_files = array();
|
15 |
-
while( false !== ( $entry = $md->read() ) )
|
16 |
-
{
|
17 |
-
if ( strlen( $entry ) > 3 && is_dir( $md->path.'/'.$entry ) )
|
18 |
-
{
|
19 |
-
if ( file_exists( $md->path.'/'.$entry.'/public' ) )
|
20 |
-
{
|
21 |
-
$m = dir( $md->path.'/'.$entry.'/public' );
|
22 |
-
while( false !== ( $mentry = $m->read() ) )
|
23 |
-
{
|
24 |
-
if( strlen( $mentry ) > 3 && strtolower( substr( $mentry, strlen( $mentry ) - 3 ) ) == '.js' )
|
25 |
-
{
|
26 |
-
$modules_files[] = $m->path.'/'.$mentry;
|
27 |
-
}
|
28 |
-
}
|
29 |
-
}
|
30 |
-
|
31 |
-
}
|
32 |
-
}
|
33 |
-
sort( $modules_files );
|
34 |
-
foreach( $modules_files as $file )
|
35 |
-
{
|
36 |
-
require $file;
|
37 |
-
}
|
38 |
-
}
|
39 |
-
catch (Exception $e)
|
40 |
-
{
|
41 |
-
// ignore the error
|
42 |
-
}
|
43 |
-
|
44 |
-
// Load Control files
|
45 |
-
require 'fbuilder-pro-public.jquery.js';
|
46 |
-
try {
|
47 |
-
$d = dir( dirname( __FILE__ )."/fields-public" );
|
48 |
-
$controls_files = array();
|
49 |
-
while (false !== ($entry = $d->read())) {
|
50 |
-
if (strlen($entry) > 3 && strtolower(substr($entry,strlen($entry)-3)) == '.js')
|
51 |
-
if ( file_exists( $d->path.'/'.$entry ) )
|
52 |
-
$controls_files[] = $d->path.'/'.$entry;
|
53 |
-
}
|
54 |
-
sort( $controls_files );
|
55 |
-
foreach( $controls_files as $file )
|
56 |
-
{
|
57 |
-
require $file;
|
58 |
-
}
|
59 |
-
} catch (Exception $e) {
|
60 |
-
// ignore the error
|
61 |
-
}
|
62 |
-
?>
|
63 |
-
var fcount = 1;
|
64 |
-
var fnum = "_"+fcount;
|
65 |
-
while (eval("typeof cp_ppp_fbuilder_config"+fnum+" != 'undefined'"))
|
66 |
-
{
|
67 |
-
try {
|
68 |
-
var cp_ppp_fbuilder_config = eval("cp_ppp_fbuilder_config"+fnum);
|
69 |
-
var f = $("#fbuilder"+fnum).fbuilder($.parseJSON(cp_ppp_fbuilder_config.obj));
|
70 |
-
f.fBuild.loadData("form_structure"+fnum);
|
71 |
-
$("#cp_ppp_pform"+fnum).validate({
|
72 |
-
ignore:".ignore,.ignorepb",
|
73 |
-
errorElement: "div",
|
74 |
-
errorPlacement: function(e, element)
|
75 |
-
{
|
76 |
-
if (element.hasClass('group'))
|
77 |
-
element = element.parent();
|
78 |
-
e.insertBefore(element);
|
79 |
-
e.addClass('message'); // add a class to the wrapper
|
80 |
-
e.css('position', 'absolute');
|
81 |
-
e.css('left',0 );
|
82 |
-
e.css('top',element.parent().outerHeight(true));
|
83 |
-
}
|
84 |
-
});
|
85 |
-
} catch (e) {}
|
86 |
-
fcount++;
|
87 |
-
fnum = "_"+fcount;
|
88 |
-
}
|
89 |
-
})(fbuilderjQuery);
|
90 |
-
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
js/fbuilder-pro-admin.jquery.js
DELETED
@@ -1,918 +0,0 @@
|
|
1 |
-
var ppp_started=false;
|
2 |
-
$.fbuilder[ 'typeList' ] = [];
|
3 |
-
$.fbuilder[ 'categoryList' ] = [];
|
4 |
-
$.fbuilder[ 'controls' ] = {};
|
5 |
-
|
6 |
-
$.fbuilder[ 'preview' ] = function( e )
|
7 |
-
{
|
8 |
-
var f = $( e.form );
|
9 |
-
f.attr( 'target', 'formpopup' ).attr(
|
10 |
-
'onsubmit',
|
11 |
-
function( f )
|
12 |
-
{
|
13 |
-
var w = screen.width*0.8,
|
14 |
-
h = screen.height*0.7,
|
15 |
-
l = screen.width/2 - w/2,
|
16 |
-
t = screen.height/2 - h/2,
|
17 |
-
new_window = window.open('', 'formpopup', 'resizeable,scrollbars,width='+w+',height='+h+',left='+l+',top='+t);
|
18 |
-
|
19 |
-
$( f ).removeAttr( 'onsubmit' );
|
20 |
-
new_window.focus();
|
21 |
-
}
|
22 |
-
);
|
23 |
-
$( '<input type="hidden" name="preview" value="1" />' ).appendTo( f );
|
24 |
-
|
25 |
-
f[ 0 ].submit();
|
26 |
-
f.attr( 'target', '_self' ).find( 'input[name="preview"]').remove();
|
27 |
-
};
|
28 |
-
|
29 |
-
$.fbuilder[ 'htmlEncode' ] = function(value)
|
30 |
-
{
|
31 |
-
value = $('<div/>').text(value).html()
|
32 |
-
value = value.replace( /&/g, '&' ).replace(/"/g, """);
|
33 |
-
return value;
|
34 |
-
};
|
35 |
-
|
36 |
-
$.fbuilder[ 'escape_symbol' ] = function( value ) // Escape the symbols used in regulars expressions
|
37 |
-
{
|
38 |
-
return value.replace(/([\^\$\-\.\,\[\]\(\)\/\\\*\?\+\!\{\}])/g, "\\$1");
|
39 |
-
};
|
40 |
-
|
41 |
-
$.fbuilder[ 'parseVal' ] = function( value, thousandSeparator, decimalSymbol )
|
42 |
-
{
|
43 |
-
if( value == '' ) return 0;
|
44 |
-
value += '';
|
45 |
-
|
46 |
-
thousandSeparator = new RegExp( $.fbuilder.escape_symbol( ( typeof thousandSeparator == 'undefined' ) ? ',' : thousandSeparator ), 'g' );
|
47 |
-
decimalSymbol = new RegExp( $.fbuilder.escape_symbol( ( typeof decimalSymbol == 'undefined' ) ? '.' : decimalSymbol ), 'g' );
|
48 |
-
|
49 |
-
var t = value.replace( thousandSeparator, '' ).replace( decimalSymbol, '.' ).replace( /\s/g, '' ),
|
50 |
-
p = /[+-]?((\d+(\.\d+)?)|(\.\d+))/.exec( t );
|
51 |
-
|
52 |
-
return ( p ) ? p[0]*1 : '"' + value.replace(/'/g, "\\'").replace( /\$/g, '') + '"';
|
53 |
-
};
|
54 |
-
|
55 |
-
$.fbuilder[ 'showErrorMssg' ] = function( str ) // Display an error message
|
56 |
-
{
|
57 |
-
$( '.form-builder-error-messages' ).html( '<div class="error-text">' + str + '</div>' );
|
58 |
-
};
|
59 |
-
|
60 |
-
// fbuilder plugin
|
61 |
-
$.fn.fbuilder = function(options){
|
62 |
-
var opt = $.extend({},
|
63 |
-
{
|
64 |
-
pub:false,
|
65 |
-
identifier:"",
|
66 |
-
title:""
|
67 |
-
},
|
68 |
-
options, true),
|
69 |
-
typeList = $.fbuilder.typeList,
|
70 |
-
categoryList = $.fbuilder.categoryList;
|
71 |
-
|
72 |
-
$.fbuilder[ 'getNameByIdFromType' ] = function( id )
|
73 |
-
{
|
74 |
-
for ( var i = 0, h = typeList.length; i < h; i++ )
|
75 |
-
{
|
76 |
-
if ( typeList[i].id == id )
|
77 |
-
{
|
78 |
-
return typeList[i].name;
|
79 |
-
}
|
80 |
-
}
|
81 |
-
return "";
|
82 |
-
};
|
83 |
-
|
84 |
-
for ( var i=0, h = typeList.length; i < h; i++ )
|
85 |
-
{
|
86 |
-
var category_id = typeList[ i ].control_category;
|
87 |
-
|
88 |
-
if( typeof categoryList[ category_id ] == 'undefined' )
|
89 |
-
{
|
90 |
-
categoryList[ category_id ] = { title : '', description : '', typeList : [] };
|
91 |
-
}
|
92 |
-
else if( typeof categoryList[ category_id ][ 'typeList' ] == 'undefined' )
|
93 |
-
{
|
94 |
-
categoryList[ category_id ][ 'typeList' ] = [];
|
95 |
-
}
|
96 |
-
|
97 |
-
categoryList[ category_id ].typeList.push( i );
|
98 |
-
}
|
99 |
-
|
100 |
-
for ( var i in categoryList )
|
101 |
-
{
|
102 |
-
$("#tabs-1").append('<div style="clear:both;"></div><div>'+categoryList[ i ].title+'</div><hr />');
|
103 |
-
if( typeof categoryList[ i ][ 'description' ] != 'undefined' && !/^\s*$/.test( categoryList[ i ][ 'description' ] ) )
|
104 |
-
{
|
105 |
-
$("#tabs-1").append('<div style="clear:both;"></div><div class="category-description">'+categoryList[ i ].description+'</div>');
|
106 |
-
}
|
107 |
-
|
108 |
-
if( typeof categoryList[ i ][ 'typeList' ] != 'undefined' )
|
109 |
-
{
|
110 |
-
for( var j = 0, k = categoryList[ i ].typeList.length; j < k; j++ )
|
111 |
-
{
|
112 |
-
var index = categoryList[ i ].typeList[ j ];
|
113 |
-
$("#tabs-1").append('<div class="button itemForm width40" id="'+typeList[ index ].id+'">'+typeList[ index ].name+'</div>');
|
114 |
-
}
|
115 |
-
}
|
116 |
-
}
|
117 |
-
|
118 |
-
$("#tabs-1").append('<div class="clearer"></div>');
|
119 |
-
$( ".button").button();
|
120 |
-
|
121 |
-
// Create a items object
|
122 |
-
var items = [],
|
123 |
-
fieldsIndex = {},
|
124 |
-
calculatedFields = {},
|
125 |
-
selected = -3;
|
126 |
-
|
127 |
-
$.fbuilder[ 'editItem' ] = function( id )
|
128 |
-
{
|
129 |
-
selected = id;
|
130 |
-
try
|
131 |
-
{
|
132 |
-
$('#tabs-2').html( items[id].showAllSettings() );
|
133 |
-
} catch (e) {}
|
134 |
-
items[id].editItemEvents();
|
135 |
-
};
|
136 |
-
|
137 |
-
$.fbuilder[ 'removeItem' ] = function( index )
|
138 |
-
{
|
139 |
-
if( typeof items[ index ][ 'remove' ] != 'undefined' ) items[ index ][ 'remove' ]();
|
140 |
-
items.splice(index,1);
|
141 |
-
for ( var i=0, h = items.length; i<h; i++ )
|
142 |
-
{
|
143 |
-
items[i].index = i;
|
144 |
-
}
|
145 |
-
selected = -2;
|
146 |
-
$('#tabs').tabs("option", "active", 0);
|
147 |
-
$.fbuilder.reloadItems();
|
148 |
-
};
|
149 |
-
|
150 |
-
$.fbuilder[ 'duplicateItem' ] = function( index )
|
151 |
-
{
|
152 |
-
var n = 0;
|
153 |
-
for ( var i=0, h = items.length; i<h; i++ )
|
154 |
-
{
|
155 |
-
n1 = parseInt( items[i].name.replace( /fieldname/g,"" ) );
|
156 |
-
if (n1>n)
|
157 |
-
n = n1;
|
158 |
-
}
|
159 |
-
|
160 |
-
if( $( '#field-' + items[ index ].index ).parents( '.fields' ).length )
|
161 |
-
{
|
162 |
-
var i = $( '#field-' + items[ index ].index ).parents( '.fields' ).attr( 'id' ).replace( 'field-', '' );
|
163 |
-
if( typeof items[ i ][ 'duplicateItem' ] != 'undefined' ) items[ i ][ 'duplicateItem' ]( items[ index ].name, 'fieldname'+( n + 1 ) );
|
164 |
-
}
|
165 |
-
|
166 |
-
items.splice( index*1+1, 0, $.extend( true, {}, items[index], { name:"fieldname"+(n+1) } ) );
|
167 |
-
for ( var i=index*1+1, h = items.length; i<h; i++ )
|
168 |
-
{
|
169 |
-
items[i].index = i;
|
170 |
-
}
|
171 |
-
|
172 |
-
$('#tabs').tabs("option", "active", 0);
|
173 |
-
$.fbuilder.reloadItems();
|
174 |
-
}
|
175 |
-
|
176 |
-
$.fbuilder[ 'editForm' ] = function()
|
177 |
-
{
|
178 |
-
$('#tabs-3').html(theForm.showAllSettings());
|
179 |
-
selected = -1;
|
180 |
-
|
181 |
-
$("#fTitle").keyup(function()
|
182 |
-
{
|
183 |
-
theForm.title = $(this).val();
|
184 |
-
$.fbuilder.reloadItems();
|
185 |
-
});
|
186 |
-
|
187 |
-
$("#fEvalEquations").click(function()
|
188 |
-
{
|
189 |
-
theForm.evalequations = ($(this).is( ':checked' )) ? 1 : 0;
|
190 |
-
$.fbuilder.reloadItems();
|
191 |
-
});
|
192 |
-
|
193 |
-
$("#fAutocomplete").click(function()
|
194 |
-
{
|
195 |
-
theForm.autocomplete = ($(this).is( ':checked' )) ? 1 : 0;
|
196 |
-
$.fbuilder.reloadItems();
|
197 |
-
});
|
198 |
-
|
199 |
-
$("#fDescription").keyup(function()
|
200 |
-
{
|
201 |
-
theForm.description = $(this).val();
|
202 |
-
$.fbuilder.reloadItems();
|
203 |
-
});
|
204 |
-
|
205 |
-
$("#fLayout").change(function()
|
206 |
-
{
|
207 |
-
theForm.formlayout = $(this).val();
|
208 |
-
$.fbuilder.reloadItems();
|
209 |
-
});
|
210 |
-
|
211 |
-
$("#fTemplate").change(function()
|
212 |
-
{
|
213 |
-
theForm.formtemplate = $(this).val();
|
214 |
-
var template = $.fbuilder.showSettings.formTemplateDic[ theForm.formtemplate ],
|
215 |
-
thumbnail = '',
|
216 |
-
description = '';
|
217 |
-
|
218 |
-
if( typeof template != 'undefined' )
|
219 |
-
{
|
220 |
-
if( typeof template[ 'thumbnail' ] != 'undefined' )
|
221 |
-
{
|
222 |
-
thumbnail = '<img src="' + template[ 'thumbnail' ] + '">';
|
223 |
-
}
|
224 |
-
if( typeof template[ 'description' ] != 'undefined' )
|
225 |
-
{
|
226 |
-
description = template[ 'description' ];
|
227 |
-
}
|
228 |
-
}
|
229 |
-
$( '#fTemplateThumbnail' ).html( thumbnail );
|
230 |
-
$( '#fTemplateDescription' ).html( description );
|
231 |
-
$.fbuilder.reloadItems();
|
232 |
-
});
|
233 |
-
};
|
234 |
-
|
235 |
-
$.fbuilder[ 'reloadItems' ] = function()
|
236 |
-
{
|
237 |
-
if (ppp_started){alert('* Note: The Form Builder is read-only in this version.');return;}else {ppp_started=true;}
|
238 |
-
for ( var i=0, h = $.fbuilder.showSettings.formlayoutList.length; i < h; i++ )
|
239 |
-
{
|
240 |
-
$("#fieldlist"+opt.identifier).removeClass( $.fbuilder.showSettings.formlayoutList[i].id );
|
241 |
-
}
|
242 |
-
$("#fieldlist"+opt.identifier).addClass(theForm.formlayout);
|
243 |
-
$("#formheader"+opt.identifier).html(theForm.display());
|
244 |
-
$("#fieldlist"+opt.identifier).html("");
|
245 |
-
if ( parseInt( selected ) == -1 )
|
246 |
-
{
|
247 |
-
$(".fform").addClass("ui-selected");
|
248 |
-
}
|
249 |
-
else
|
250 |
-
{
|
251 |
-
$(".fform").removeClass("ui-selected");
|
252 |
-
}
|
253 |
-
|
254 |
-
fieldsIndex = {};
|
255 |
-
calculatedFields = {};
|
256 |
-
for ( var i=0, h = items.length; i < h; i++ )
|
257 |
-
{
|
258 |
-
items[i].index = i;
|
259 |
-
fieldsIndex[ items[i].name ] = i;
|
260 |
-
if( items[i].ftype == 'fCalculated')
|
261 |
-
{
|
262 |
-
calculatedFields[ items[i].name ] = i;
|
263 |
-
}
|
264 |
-
$("#fieldlist"+opt.identifier).append(items[i].display());
|
265 |
-
if ( i == selected )
|
266 |
-
{
|
267 |
-
$("#field"+opt.identifier+"-"+i).addClass("ui-selected");
|
268 |
-
if( $('#tabs').tabs("option", "active") != 1 )
|
269 |
-
{
|
270 |
-
$.fbuilder[ 'editItem' ]( i );
|
271 |
-
}
|
272 |
-
}
|
273 |
-
else
|
274 |
-
{
|
275 |
-
$("#field"+opt.identifier+"-"+i).removeClass("ui-selected");
|
276 |
-
}
|
277 |
-
$("#field"+opt.identifier+"-"+i+" .remove").click(function()
|
278 |
-
{
|
279 |
-
$.fbuilder[ 'removeItem' ]($(this).parent().attr("id").replace("field"+opt.identifier+"-",""));
|
280 |
-
});
|
281 |
-
|
282 |
-
$("#field"+opt.identifier+"-"+i+" .copy").click(function()
|
283 |
-
{
|
284 |
-
$.fbuilder[ 'duplicateItem' ]($(this).parent().attr("id").replace("field"+opt.identifier+"-",""));
|
285 |
-
});
|
286 |
-
|
287 |
-
}
|
288 |
-
for ( var i=0, h = items.length; i < h; i++ )
|
289 |
-
{
|
290 |
-
if( typeof items[ i ].after_show != 'undefined' ) items[ i ].after_show();
|
291 |
-
}
|
292 |
-
if (items.length>0)
|
293 |
-
{
|
294 |
-
$(".fields").mouseover(function( evt )
|
295 |
-
{
|
296 |
-
$(this).addClass("ui-over");
|
297 |
-
evt.stopPropagation();
|
298 |
-
})
|
299 |
-
.mouseout(function( evt )
|
300 |
-
{
|
301 |
-
$(this).removeClass("ui-over");
|
302 |
-
evt.stopPropagation();
|
303 |
-
})
|
304 |
-
.click(function( evt )
|
305 |
-
{
|
306 |
-
evt.stopPropagation();
|
307 |
-
$.fbuilder[ 'editItem' ]($(this).attr("id").replace("field"+opt.identifier+"-",""));
|
308 |
-
$( '#fieldlist .ui-selected' ).removeClass("ui-selected");
|
309 |
-
$(this).addClass("ui-selected");
|
310 |
-
$('#tabs').tabs("option", "active", 1);
|
311 |
-
});
|
312 |
-
$(".field").focus(function()
|
313 |
-
{
|
314 |
-
$(this).blur();
|
315 |
-
});
|
316 |
-
}
|
317 |
-
|
318 |
-
$(".fform").mouseover(function()
|
319 |
-
{
|
320 |
-
$(this).addClass("ui-over");
|
321 |
-
})
|
322 |
-
.mouseout(function()
|
323 |
-
{
|
324 |
-
$(this).removeClass("ui-over");
|
325 |
-
})
|
326 |
-
.click(function( evt ){
|
327 |
-
evt.stopPropagation();
|
328 |
-
$('#tabs').tabs("option", "active", 2);
|
329 |
-
$.fbuilder.editForm();
|
330 |
-
$(this).siblings().removeClass("ui-selected");
|
331 |
-
$(this).addClass("ui-selected");
|
332 |
-
});
|
333 |
-
|
334 |
-
ffunct.saveData("form_structure");
|
335 |
-
|
336 |
-
//email list
|
337 |
-
var str = "",
|
338 |
-
cu_user_email_field = $('#cu_user_email_field').attr("def").split( ',' );
|
339 |
-
|
340 |
-
for ( var i=0, h = items.length; i < h; i++ )
|
341 |
-
{
|
342 |
-
var item = items[ i ];
|
343 |
-
if (item.ftype=="femail" || item.ftype=="femailds")
|
344 |
-
{
|
345 |
-
str += '<option value="'+item.name+'" '+( ( $.inArray( item.name, cu_user_email_field ) != -1 ) ? "selected" : "" )+'>'+item.name+' ('+item.title+')'+'</option>';
|
346 |
-
}
|
347 |
-
}
|
348 |
-
$('#cu_user_email_field').html(str);
|
349 |
-
|
350 |
-
// recurrent payments
|
351 |
-
var str = "",
|
352 |
-
paypal_recurrent_field = $('[name="paypal_recurrent_field"]').attr("def");
|
353 |
-
|
354 |
-
for ( var i=0, h = items.length; i < h; i++ )
|
355 |
-
{
|
356 |
-
var item = items[ i ];
|
357 |
-
if (item.ftype=="fradio" || item.ftype=="fdropdown")
|
358 |
-
{
|
359 |
-
str += '<option value="'+item.name+'" '+( ( item.name == paypal_recurrent_field ) ? "selected" : "" )+'>'+item.name+' ('+item.title+')'+'</option>';
|
360 |
-
}
|
361 |
-
}
|
362 |
-
$('[name="paypal_recurrent_field"]').html(str);
|
363 |
-
|
364 |
-
//field list for paypal request
|
365 |
-
if (($('#request_cost').length > 0) && ($('#request_cost').is('select')))
|
366 |
-
{
|
367 |
-
var str = "",
|
368 |
-
request_cost = $('#request_cost').attr("def");
|
369 |
-
|
370 |
-
for (var i=0, h = items.length; i<h; i++)
|
371 |
-
{
|
372 |
-
var item = items[ i ];
|
373 |
-
str += '<option value="'+item.name+'" '+( ( item.name == request_cost ) ? "selected" : "" )+'>'+item.name+'('+(item.title)+')</option>';
|
374 |
-
}
|
375 |
-
$('#request_cost').html(str);
|
376 |
-
}
|
377 |
-
|
378 |
-
//request amount list
|
379 |
-
if ($('#paypal_price_field').length > 0)
|
380 |
-
{
|
381 |
-
var paypal_price_field = $('#paypal_price_field').attr("def"),
|
382 |
-
str = '<option value="" '+( ('' == paypal_price_field ) ? "selected" : "" )+'> ---- No ---- </option>';
|
383 |
-
|
384 |
-
for (var i=0, h = items.length; i < h; i++)
|
385 |
-
{
|
386 |
-
var item = items[ i ];
|
387 |
-
str += '<option value="'+item.name+'" '+( ( item.name == paypal_price_field ) ? "selected" : "" )+'>'+(item.title)+'</option>';
|
388 |
-
}
|
389 |
-
$('#paypal_price_field').html(str);
|
390 |
-
}
|
391 |
-
};
|
392 |
-
|
393 |
-
var fform=function(){};
|
394 |
-
$.extend(fform.prototype,
|
395 |
-
{
|
396 |
-
title:"Untitled Form",
|
397 |
-
description:"This is my form. Please fill it out. It's awesome!",
|
398 |
-
formlayout:"top_aligned",
|
399 |
-
formtemplate:"",
|
400 |
-
evalequations:1,
|
401 |
-
autocomplete:1,
|
402 |
-
display:function()
|
403 |
-
{
|
404 |
-
return '<div class="fform" id="field"><div class="arrow ui-icon ui-icon-play "></div><h1>'+this.title+'</h1><span>'+this.description+'</span></div>';
|
405 |
-
},
|
406 |
-
|
407 |
-
showAllSettings:function()
|
408 |
-
{
|
409 |
-
var layout = '',
|
410 |
-
template = '<option value="">Use default template</option>',
|
411 |
-
thumbnail = '',
|
412 |
-
description = '',
|
413 |
-
selected = '';
|
414 |
-
|
415 |
-
for ( var i = 0; i< $.fbuilder.showSettings.formlayoutList.length; i++ )
|
416 |
-
{
|
417 |
-
layout += '<option value="'+$.fbuilder.showSettings.formlayoutList[i].id+'" '+(($.fbuilder.showSettings.formlayoutList[i].id==this.formlayout)?"selected":"")+'>'+$.fbuilder.showSettings.formlayoutList[i].name+'</option>';
|
418 |
-
}
|
419 |
-
|
420 |
-
for ( var i in $.fbuilder.showSettings.formTemplateDic )
|
421 |
-
{
|
422 |
-
if( /^\s*$/.test( i ) ) break;
|
423 |
-
selected = '';
|
424 |
-
if( $.fbuilder.showSettings.formTemplateDic[i].prefix==this.formtemplate )
|
425 |
-
{
|
426 |
-
selected = 'SELECTED';
|
427 |
-
if( typeof $.fbuilder.showSettings.formTemplateDic[i].thumbnail != 'undefined' )
|
428 |
-
{
|
429 |
-
thumbnail = '<img src="'+$.fbuilder.showSettings.formTemplateDic[i].thumbnail+'">';
|
430 |
-
}
|
431 |
-
|
432 |
-
if( typeof $.fbuilder.showSettings.formTemplateDic[i].description != 'undefined' )
|
433 |
-
{
|
434 |
-
description = $.fbuilder.showSettings.formTemplateDic[i].description;
|
435 |
-
}
|
436 |
-
}
|
437 |
-
|
438 |
-
template += '<option value="'+$.fbuilder.showSettings.formTemplateDic[i].prefix+'" ' + selected + '>'+$.fbuilder.showSettings.formTemplateDic[i].title+'</option>';
|
439 |
-
}
|
440 |
-
return '<div><label>Form Name</label><input class="large" name="fTitle" id="fTitle" value="'+$.fbuilder.htmlEncode(this.title)+'" /></div><div><label>Description</label><textarea class="large" name="fDescription" id="fDescription">'+this.description+'</textarea></div><div><label>Label Placement</label><br /><select name="fLayout" id="fLayout" class="large">'+layout+'</select></div><div><label><input type="checkbox" name="fAutocomplete" id="fAutocomplete" '+( ( this.autocomplete ) ? 'CHECKED' : '' )+' /> Enable autocompletion</label></div>' + ( ( typeof $.fbuilder.controls[ 'fCalculated' ] != 'undefined' ) ? '<div><label><input type="checkbox" name="fEvalEquations" id="fEvalEquations" '+( ( this.evalequations ) ? 'CHECKED' : '' )+' /> Eval dynamically the equations associated to the calculated fields</label></div>' : '' ) + '<div><label>Form Template</label><br /><select name="fTemplate" id="fTemplate" class="large">'+template+'</select></div><br /><div><span id="fTemplateThumbnail" style="float:left;padding-right:10px;">'+thumbnail+'</span><span id="fTemplateDescription" style="float:left;">'+description+'</span></div>' ;
|
441 |
-
}
|
442 |
-
}
|
443 |
-
);
|
444 |
-
|
445 |
-
var theForm = new fform();
|
446 |
-
$("#fbuilder").click( function( evt )
|
447 |
-
{
|
448 |
-
evt.stopPropagation();
|
449 |
-
selected = -2;
|
450 |
-
$(".fform").removeClass("ui-selected")
|
451 |
-
$( '#fieldlist .ui-selected' ).removeClass("ui-selected");
|
452 |
-
$('#tabs').tabs("option", "active", 0);
|
453 |
-
}
|
454 |
-
);
|
455 |
-
$("#fieldlist"+opt.identifier).sortable(
|
456 |
-
{
|
457 |
-
'connectWith': '.ui-sortable',
|
458 |
-
'items': '.fields',
|
459 |
-
'update': function( event, ui )
|
460 |
-
{
|
461 |
-
var i, h = items.length;
|
462 |
-
for( i = 0; i < h; i++ )
|
463 |
-
{
|
464 |
-
if( ui.item.hasClass( items[ i ].name ) ) break;
|
465 |
-
}
|
466 |
-
|
467 |
-
if( ui.item.parent().attr( 'id' ) == 'fieldlist' )
|
468 |
-
{
|
469 |
-
// receive or change order in fieldlist
|
470 |
-
var end_pos = parseInt( ui.item.index() );
|
471 |
-
items.splice( end_pos, 0, items.splice( i, 1 )[ 0 ] );
|
472 |
-
$.fbuilder.reloadItems();
|
473 |
-
}
|
474 |
-
else
|
475 |
-
{
|
476 |
-
// remove
|
477 |
-
items = items.concat( items.splice( i, 1 ) );
|
478 |
-
}
|
479 |
-
}
|
480 |
-
}
|
481 |
-
);
|
482 |
-
|
483 |
-
$('#tabs').tabs(
|
484 |
-
{
|
485 |
-
activate: function(event, ui)
|
486 |
-
{
|
487 |
-
switch( $(this).tabs( "option", "active" ) )
|
488 |
-
{
|
489 |
-
case 0:
|
490 |
-
$(".fform").removeClass("ui-selected");
|
491 |
-
break;
|
492 |
-
case 1:
|
493 |
-
$(".fform").removeClass("ui-selected");
|
494 |
-
if (selected < 0)
|
495 |
-
{
|
496 |
-
$('#tabs-2').html('<b>No Field Selected</b><br />Please click on a field in the form preview on the right to change its properties.');
|
497 |
-
}
|
498 |
-
break;
|
499 |
-
case 2:
|
500 |
-
$(".fields").removeClass("ui-selected");
|
501 |
-
$(".fform").addClass("ui-selected");
|
502 |
-
$.fbuilder.editForm();
|
503 |
-
break;
|
504 |
-
}
|
505 |
-
}
|
506 |
-
}
|
507 |
-
);
|
508 |
-
|
509 |
-
var ffunct = {
|
510 |
-
getFieldsIndex: function()
|
511 |
-
{
|
512 |
-
return fieldsIndex;
|
513 |
-
},
|
514 |
-
getCalculatedFields: function()
|
515 |
-
{
|
516 |
-
return calculatedFields;
|
517 |
-
},
|
518 |
-
getItems: function()
|
519 |
-
{
|
520 |
-
return items;
|
521 |
-
},
|
522 |
-
addItem: function(id)
|
523 |
-
{
|
524 |
-
var obj = eval("new $.fbuilder.controls['"+id+"']();"),
|
525 |
-
fBuild = this,
|
526 |
-
n = 0;
|
527 |
-
|
528 |
-
obj.init();
|
529 |
-
for (var i=0, h = items.length; i < h; i++)
|
530 |
-
{
|
531 |
-
n1 = parseInt(items[i].name.replace(/fieldname/g,""));
|
532 |
-
if (n1>n)
|
533 |
-
{
|
534 |
-
n = n1;
|
535 |
-
}
|
536 |
-
}
|
537 |
-
n++;
|
538 |
-
obj.fBuild = fBuild;
|
539 |
-
$.extend(obj,{name:"fieldname"+n});
|
540 |
-
|
541 |
-
if( selected >= 0 )
|
542 |
-
{
|
543 |
-
items.splice( (selected)*1+1, 0, obj );
|
544 |
-
if( typeof items[ selected ][ 'addItem' ] != 'undefined' )
|
545 |
-
{
|
546 |
-
items[ selected ][ 'addItem' ]( obj.name );
|
547 |
-
}
|
548 |
-
else
|
549 |
-
{
|
550 |
-
selected++;
|
551 |
-
}
|
552 |
-
}
|
553 |
-
else
|
554 |
-
{
|
555 |
-
selected = items.length;
|
556 |
-
items[selected] = obj;
|
557 |
-
}
|
558 |
-
$.fbuilder.reloadItems();
|
559 |
-
},
|
560 |
-
saveData:function(f)
|
561 |
-
{
|
562 |
-
var itemsStringified = $.stringifyXX( items ),
|
563 |
-
theFormStringified = $.stringifyXX( theForm ),
|
564 |
-
errorTxt = 'The entered data includes invalid characters. Please, if you are copying and pasting from another platform, be sure the data not include invalid characters.',
|
565 |
-
str;
|
566 |
-
|
567 |
-
if( typeof global_varible_save_data != 'undefined' )
|
568 |
-
{
|
569 |
-
// If the global_varible_save_data exists clear the form-builder-error-messages
|
570 |
-
$( '.form-builder-error-messages' ).html( '' );
|
571 |
-
}
|
572 |
-
|
573 |
-
try{
|
574 |
-
if( $.parseJSON( itemsStringified ) != null && $.parseJSON( theFormStringified ) != null )
|
575 |
-
{
|
576 |
-
str = "["+ itemsStringified +",["+ theFormStringified +"]]";
|
577 |
-
$( "#"+f ).val( str );
|
578 |
-
$( "#form_structure_crc" ).val( str.length );
|
579 |
-
}
|
580 |
-
else
|
581 |
-
{
|
582 |
-
$.fbuilder[ 'showErrorMssg' ]( errorTxt );
|
583 |
-
}
|
584 |
-
}
|
585 |
-
catch( err )
|
586 |
-
{
|
587 |
-
$.fbuilder[ 'showErrorMssg' ]( errorTxt );
|
588 |
-
}
|
589 |
-
|
590 |
-
global_varible_save_data = true;
|
591 |
-
},
|
592 |
-
loadData:function(form_structure, available_templates)
|
593 |
-
{
|
594 |
-
var structure = $.parseJSON( $("#"+form_structure).val() ), // JSON data
|
595 |
-
templates = ( typeof available_templates == 'undefined' ) ? null : $.parseJSON( $("#"+available_templates).val() ),
|
596 |
-
fBuild = this;
|
597 |
-
|
598 |
-
if ( structure )
|
599 |
-
{
|
600 |
-
if (structure.length==2)
|
601 |
-
{
|
602 |
-
items = [];
|
603 |
-
for (var i=0;i<structure[0].length;i++)
|
604 |
-
{
|
605 |
-
var obj = eval("new $.fbuilder.controls['"+structure[0][i].ftype+"']();");
|
606 |
-
obj = $.extend( true, {}, obj, structure[0][i] );
|
607 |
-
obj.name = obj.name+opt.identifier;
|
608 |
-
obj.form_identifier = opt.identifier;
|
609 |
-
obj.fBuild = fBuild;
|
610 |
-
items[items.length] = obj;
|
611 |
-
}
|
612 |
-
theForm = new fform();
|
613 |
-
theForm = $.extend(theForm,structure[1][0]);
|
614 |
-
$.fbuilder.reloadItems();
|
615 |
-
}
|
616 |
-
}
|
617 |
-
|
618 |
-
if( templates )
|
619 |
-
{
|
620 |
-
$.fbuilder.showSettings.formTemplateDic = templates;
|
621 |
-
}
|
622 |
-
},
|
623 |
-
removeItem: $.fbuilder[ 'removeItem' ],
|
624 |
-
editItem: $.fbuilder[ 'editItem' ]
|
625 |
-
}
|
626 |
-
|
627 |
-
this.fBuild = ffunct;
|
628 |
-
return this;
|
629 |
-
};
|
630 |
-
|
631 |
-
$.fbuilder[ 'showSettings' ] = {
|
632 |
-
sizeList:new Array({id:"small",name:"Small"},{id:"medium",name:"Medium"},{id:"large",name:"Large"}),
|
633 |
-
layoutList:new Array({id:"one_column",name:"One Column"},{id:"two_column",name:"Two Column"},{id:"three_column",name:"Three Column"},{id:"side_by_side",name:"Side by Side"}),
|
634 |
-
formlayoutList:new Array({id:"top_aligned",name:"Top Aligned"},{id:"left_aligned",name:"Left Aligned"},{id:"right_aligned",name:"Right Aligned"}),
|
635 |
-
formTemplateDic: {}, // Form Template dictionary
|
636 |
-
showFieldType: function( v )
|
637 |
-
{
|
638 |
-
return '<label>Field Type: '+$.fbuilder[ 'getNameByIdFromType' ]( v )+'</label><br /><br />';
|
639 |
-
},
|
640 |
-
showTitle: function(v)
|
641 |
-
{
|
642 |
-
return '<label>Field Label</label><textarea class="large" name="sTitle" id="sTitle">'+v+'</textarea>';
|
643 |
-
},
|
644 |
-
showShortLabel: function( v )
|
645 |
-
{
|
646 |
-
return '<div><label>Short label (optional) [<a class="helpfbuilder" text="The short label is used at title for the column when exporting the form data to CSV files.\n\nIf the short label is empty then, the field label will be used for the CSV file.">help?</a>] :</label><input class="large" name="sShortlabel" id="sShortlabel" value="'+v+'" /></div>';
|
647 |
-
},
|
648 |
-
showName: function( v )
|
649 |
-
{
|
650 |
-
return '<div><label>Field name, tag for the message:</label><input readonly="readonly" class="large" name="sNametag" id="sNametag" value="<%'+v+'%>" />'+
|
651 |
-
'<input style="display:none" readonly="readonly" class="large" name="sName" id="sName" value="'+v+'" /></div>';
|
652 |
-
},
|
653 |
-
showPredefined: function(v,c)
|
654 |
-
{
|
655 |
-
return '<div><label>Predefined Value</label><textarea class="large" name="sPredefined" id="sPredefined">'+v+'</textarea><br /><input type="checkbox" name="sPredefinedClick" id="sPredefinedClick" '+((c)?"checked":"")+' value="1" > Use predefined value as placeholder.</div>';
|
656 |
-
},
|
657 |
-
showEqualTo: function(v,name)
|
658 |
-
{
|
659 |
-
return '<div><label>Equal to [<a class="helpfbuilder" text="Use this field to create password confirmation field or email confirmation fields.\n\nSpecify this setting ONLY into the confirmation field, not in the original field.">help?</a>]</label><br /><select class="equalTo" name="sEqualTo" id="sEqualTo" dvalue="'+v+'" dname="'+name+'"></select></div>';
|
660 |
-
},
|
661 |
-
showRequired: function(v)
|
662 |
-
{
|
663 |
-
return '<div><input type="checkbox" name="sRequired" id="sRequired" '+((v)?"checked":"")+'><label>Required</label></div>';
|
664 |
-
},
|
665 |
-
showSize: function(v)
|
666 |
-
{
|
667 |
-
var str = "";
|
668 |
-
for (var i=0;i<this.sizeList.length;i++)
|
669 |
-
{
|
670 |
-
str += '<option value="'+this.sizeList[i].id+'" '+((this.sizeList[i].id==v)?"selected":"")+'>'+this.sizeList[i].name+'</option>';
|
671 |
-
}
|
672 |
-
return '<label>Field Size</label><br /><select name="sSize" id="sSize">'+str+'</select>';
|
673 |
-
},
|
674 |
-
showLayout: function(v)
|
675 |
-
{
|
676 |
-
var str = "";
|
677 |
-
for (var i=0;i<this.layoutList.length;i++)
|
678 |
-
{
|
679 |
-
str += '<option value="'+this.layoutList[i].id+'" '+((this.layoutList[i].id==v)?"selected":"")+'>'+this.layoutList[i].name+'</option>';
|
680 |
-
}
|
681 |
-
return '<label>Field Layout</label><br /><select name="sLayout" id="sLayout">'+str+'</select>';
|
682 |
-
},
|
683 |
-
showUserhelp: function(v,c)
|
684 |
-
{
|
685 |
-
return '<div><label>Instructions for User</label><textarea class="large" name="sUserhelp" id="sUserhelp">'+v+'</textarea><br /><input type="checkbox" name="sUserhelpTooltip" id="sUserhelpTooltip" '+((c)?"checked":"")+' value="1" > Show as floating tooltip.</div>';
|
686 |
-
},
|
687 |
-
showCsslayout: function(v)
|
688 |
-
{
|
689 |
-
return '<label>Add Css Layout Keywords</label><input class="large" name="sCsslayout" id="sCsslayout" value="'+v+'" />';
|
690 |
-
}
|
691 |
-
};
|
692 |
-
|
693 |
-
$.fbuilder.controls[ 'ffields' ] = function(){};
|
694 |
-
$.extend( $.fbuilder.controls[ 'ffields' ].prototype,
|
695 |
-
{
|
696 |
-
form_identifier:"",
|
697 |
-
name:"",
|
698 |
-
shortlabel:"",
|
699 |
-
index:-1,
|
700 |
-
ftype:"",
|
701 |
-
userhelp:"",
|
702 |
-
userhelpTooltip:false,
|
703 |
-
csslayout:"",
|
704 |
-
init:function(){},
|
705 |
-
editItemEvents:function()
|
706 |
-
{
|
707 |
-
$("#sTitle").bind("keyup", {obj: this}, function(e)
|
708 |
-
{
|
709 |
-
var str = $(this).val();
|
710 |
-
e.data.obj.title = str.replace(/\n/g,"<br />");
|
711 |
-
$.fbuilder.reloadItems();
|
712 |
-
});
|
713 |
-
|
714 |
-
$("#sShortlabel").bind("keyup", {obj: this}, function(e)
|
715 |
-
{
|
716 |
-
e.data.obj.shortlabel = $(this).val();
|
717 |
-
$.fbuilder.reloadItems();
|
718 |
-
});
|
719 |
-
|
720 |
-
$("#sPredefined").bind("keyup", {obj: this}, function(e)
|
721 |
-
{
|
722 |
-
e.data.obj.predefined = $(this).val();
|
723 |
-
$.fbuilder.reloadItems();
|
724 |
-
});
|
725 |
-
|
726 |
-
$("#sPredefinedClick").bind("click", {obj: this}, function(e)
|
727 |
-
{
|
728 |
-
e.data.obj.predefinedClick = $(this).is(':checked');
|
729 |
-
$.fbuilder.reloadItems();
|
730 |
-
});
|
731 |
-
|
732 |
-
$("#sRequired").bind("click", {obj: this}, function(e)
|
733 |
-
{
|
734 |
-
e.data.obj.required = $(this).is(':checked');
|
735 |
-
$.fbuilder.reloadItems();
|
736 |
-
});
|
737 |
-
|
738 |
-
$("#sUserhelp").bind("keyup", {obj: this}, function(e)
|
739 |
-
{
|
740 |
-
e.data.obj.userhelp = $(this).val();
|
741 |
-
$.fbuilder.reloadItems();
|
742 |
-
});
|
743 |
-
|
744 |
-
$("#sUserhelpTooltip").bind("click", {obj: this}, function(e)
|
745 |
-
{
|
746 |
-
e.data.obj.userhelpTooltip = $(this).is(':checked');
|
747 |
-
$.fbuilder.reloadItems();
|
748 |
-
});
|
749 |
-
|
750 |
-
$("#sCsslayout").bind("keyup", {obj: this}, function(e)
|
751 |
-
{
|
752 |
-
e.data.obj.csslayout = $(this).val();
|
753 |
-
$.fbuilder.reloadItems();
|
754 |
-
});
|
755 |
-
|
756 |
-
$(".helpfbuilder").click(function()
|
757 |
-
{
|
758 |
-
alert($(this).attr("text"));
|
759 |
-
});
|
760 |
-
},
|
761 |
-
|
762 |
-
showSpecialData:function()
|
763 |
-
{
|
764 |
-
if(typeof this.showSpecialDataInstance != 'undefined')
|
765 |
-
{
|
766 |
-
return this.showSpecialDataInstance();
|
767 |
-
}
|
768 |
-
else
|
769 |
-
{
|
770 |
-
return "";
|
771 |
-
}
|
772 |
-
},
|
773 |
-
|
774 |
-
showEqualTo:function()
|
775 |
-
{
|
776 |
-
if(typeof this.equalTo != 'undefined')
|
777 |
-
{
|
778 |
-
return $.fbuilder.showSettings.showEqualTo(this.equalTo,this.name);
|
779 |
-
}
|
780 |
-
else
|
781 |
-
{
|
782 |
-
return "";
|
783 |
-
}
|
784 |
-
},
|
785 |
-
|
786 |
-
showPredefined:function()
|
787 |
-
{
|
788 |
-
if(typeof this.predefined != 'undefined')
|
789 |
-
{
|
790 |
-
return $.fbuilder.showSettings.showPredefined(this.predefined,this.predefinedClick);
|
791 |
-
}
|
792 |
-
else
|
793 |
-
{
|
794 |
-
return "";
|
795 |
-
}
|
796 |
-
},
|
797 |
-
|
798 |
-
showRequired:function()
|
799 |
-
{
|
800 |
-
if(typeof this.required != 'undefined')
|
801 |
-
{
|
802 |
-
return $.fbuilder.showSettings.showRequired(this.required);
|
803 |
-
}
|
804 |
-
else
|
805 |
-
{
|
806 |
-
return "";
|
807 |
-
}
|
808 |
-
},
|
809 |
-
|
810 |
-
showSize:function()
|
811 |
-
{
|
812 |
-
if(typeof this.size != 'undefined')
|
813 |
-
{
|
814 |
-
return $.fbuilder.showSettings.showSize(this.size);
|
815 |
-
}
|
816 |
-
else
|
817 |
-
{
|
818 |
-
return "";
|
819 |
-
}
|
820 |
-
},
|
821 |
-
|
822 |
-
showLayout:function()
|
823 |
-
{
|
824 |
-
if(typeof this.layout != 'undefined')
|
825 |
-
{
|
826 |
-
return $.fbuilder.showSettings.showLayout(this.layout);
|
827 |
-
}
|
828 |
-
else
|
829 |
-
{
|
830 |
-
return "";
|
831 |
-
}
|
832 |
-
},
|
833 |
-
|
834 |
-
showRange:function()
|
835 |
-
{
|
836 |
-
if(typeof this.min != 'undefined')
|
837 |
-
{
|
838 |
-
return this.showRangeIntance();
|
839 |
-
}
|
840 |
-
else
|
841 |
-
{
|
842 |
-
return "";
|
843 |
-
}
|
844 |
-
},
|
845 |
-
|
846 |
-
showFormat:function()
|
847 |
-
{
|
848 |
-
if(typeof this.dformat != 'undefined')
|
849 |
-
{
|
850 |
-
try
|
851 |
-
{
|
852 |
-
return this.showFormatIntance();
|
853 |
-
} catch(e) {return "";}
|
854 |
-
}
|
855 |
-
else
|
856 |
-
{
|
857 |
-
return "";
|
858 |
-
}
|
859 |
-
},
|
860 |
-
|
861 |
-
showChoice:function()
|
862 |
-
{
|
863 |
-
if(typeof this.choices != 'undefined')
|
864 |
-
{
|
865 |
-
return this.showChoiceIntance();
|
866 |
-
}
|
867 |
-
else
|
868 |
-
{
|
869 |
-
return "";
|
870 |
-
}
|
871 |
-
},
|
872 |
-
|
873 |
-
showUserhelp:function()
|
874 |
-
{
|
875 |
-
return $.fbuilder.showSettings.showUserhelp(this.userhelp,this.userhelpTooltip);
|
876 |
-
},
|
877 |
-
|
878 |
-
showCsslayout:function()
|
879 |
-
{
|
880 |
-
return $.fbuilder.showSettings.showCsslayout(this.csslayout);
|
881 |
-
},
|
882 |
-
|
883 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|