Editorial Calendar - Version 3.7.1

Version Description

We now have an option so you can choose if you want to scroll the calendar with the mouse wheel or not.

Download this release

Release Info

Developer zgrossbart
Plugin Icon wp plugin Editorial Calendar
Version 3.7.1
Comparing to
See all releases

Code changes from version 3.7 to 3.7.1

Files changed (5) hide show
  1. edcal.css +2 -2
  2. edcal.js +36 -14
  3. edcal.min.js +67 -65
  4. edcal.php +20 -1
  5. readme.txt +5 -1
edcal.css CHANGED
@@ -518,11 +518,11 @@ TinyMCE Rich Editor and Media buttons are not currently used
518
  width: 4em;
519
  }
520
 
521
- #calendar-fields-prefs {
522
  margin-bottom: 1em;
523
  }
524
 
525
- #calendar-fields-prefs label {
526
  margin-left: 1em;
527
  line-height: normal;
528
  vertical-align: baseline;
518
  width: 4em;
519
  }
520
 
521
+ div.calendar-fields-prefs {
522
  margin-bottom: 1em;
523
  }
524
 
525
+ div.calendar-fields-prefs label {
526
  margin-left: 1em;
527
  line-height: normal;
528
  vertical-align: baseline;
edcal.js CHANGED
@@ -89,6 +89,11 @@ var edcal = {
89
  This is a preference value indicating if you see the post time
90
  */
91
  timePref: true,
 
 
 
 
 
92
 
93
  /*
94
  This is a preference value indicating if we should prompt for feeback
@@ -223,6 +228,23 @@ var edcal = {
223
  This variable indicates if the drafts drawer is visible or not.
224
  */
225
  isDraftsDrawerVisible: false,
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
226
 
227
  /*
228
  * Initializes the calendar
@@ -292,17 +314,6 @@ var edcal = {
292
 
293
  edcal.moveTo(curDate.clone());
294
 
295
- /*jQuery('#edcal_scrollable').bind('mousewheel', function(event, delta) {
296
- var dir = delta > 0 ? false : true, vel = Math.abs(delta);
297
- edcal.output(dir + ' at a velocity of ' + vel);
298
-
299
- if (!edcal.isMoving && vel > 0.2) {
300
- edcal.move(1, dir);
301
- }
302
-
303
- return false;
304
- });*/
305
-
306
  /*
307
  We are handling all of our own events so we just cancel all events from
308
  the scrollable.
@@ -310,6 +321,8 @@ var edcal = {
310
  api.onBeforeSeek(function(evt, direction) {
311
  return false;
312
  });
 
 
313
 
314
  /*
315
  * We also want to listen for a few other key events
@@ -2434,7 +2447,7 @@ var edcal = {
2434
  /*
2435
  * Set up the visible fields option
2436
  */
2437
- var optionsHtml = '<div class="metabox-prefs" id="calendar-fields-prefs">' +
2438
  '<h5>' + edcal.str_show_opts + '</h5>' +
2439
  '<label for="author-hide">' +
2440
  '<input type="checkbox" ' + edcal.isPrefChecked(edcal.authorPref) + 'value="true" id="author-hide" ' +
@@ -2448,7 +2461,14 @@ var edcal = {
2448
  '<input type="checkbox" ' + edcal.isPrefChecked(edcal.timePref) + 'value="true" id="time-hide" ' +
2449
  'name="time-hide" class="hide-column-tog" />' + edcal.str_opt_time +
2450
  '</label>' +
2451
- '</div>';
 
 
 
 
 
 
 
2452
 
2453
  /*
2454
  * Set up the number of posts option
@@ -2564,11 +2584,13 @@ var edcal = {
2564
  humanMsg.displayMsg(edcal.str_weekserror);
2565
  return;
2566
  }
 
 
2567
 
2568
  var url = edcal.ajax_url() + '&action=edcal_saveoptions&weeks=' +
2569
  encodeURIComponent(jQuery('#edcal_weeks_pref').val());
2570
 
2571
- jQuery('#calendar-fields-prefs').find('input, textarea, select').each(function() {
2572
  url += '&' + encodeURIComponent(this.name) + '=' + encodeURIComponent(this.checked);
2573
  });
2574
 
89
  This is a preference value indicating if you see the post time
90
  */
91
  timePref: true,
92
+
93
+ /*
94
+ This is a preference value indiciating if we should scroll the calendar with mouse wheel scrolls
95
+ */
96
+ wheelScrollPref: true,
97
 
98
  /*
99
  This is a preference value indicating if we should prompt for feeback
228
  This variable indicates if the drafts drawer is visible or not.
229
  */
230
  isDraftsDrawerVisible: false,
231
+
232
+ enableMouseWheel: function() {
233
+ if (edcal.wheelScrollPref) {
234
+ jQuery('#edcal_scrollable').bind('mousewheel', function(event, delta) {
235
+ var dir = delta > 0 ? false : true, vel = Math.abs(delta);
236
+ //edcal.output(dir + ' at a velocity of ' + vel);
237
+
238
+ if (!edcal.isMoving && vel > 0.2) {
239
+ edcal.move(1, dir);
240
+ }
241
+
242
+ return false;
243
+ });
244
+ } else {
245
+ jQuery('#edcal_scrollable').unbind('mousewheel');
246
+ }
247
+ },
248
 
249
  /*
250
  * Initializes the calendar
314
 
315
  edcal.moveTo(curDate.clone());
316
 
 
 
 
 
 
 
 
 
 
 
 
317
  /*
318
  We are handling all of our own events so we just cancel all events from
319
  the scrollable.
321
  api.onBeforeSeek(function(evt, direction) {
322
  return false;
323
  });
324
+
325
+ edcal.enableMouseWheel();
326
 
327
  /*
328
  * We also want to listen for a few other key events
2447
  /*
2448
  * Set up the visible fields option
2449
  */
2450
+ var optionsHtml = '<div class="metabox-prefs calendar-fields-prefs">' +
2451
  '<h5>' + edcal.str_show_opts + '</h5>' +
2452
  '<label for="author-hide">' +
2453
  '<input type="checkbox" ' + edcal.isPrefChecked(edcal.authorPref) + 'value="true" id="author-hide" ' +
2461
  '<input type="checkbox" ' + edcal.isPrefChecked(edcal.timePref) + 'value="true" id="time-hide" ' +
2462
  'name="time-hide" class="hide-column-tog" />' + edcal.str_opt_time +
2463
  '</label>' +
2464
+ '</div>' +
2465
+ '<div class="metabox-prefs calendar-fields-prefs">' +
2466
+ '<h5>' + edcal.str_show_wheel_opts + '</h5>' +
2467
+ '<label for="wheel-support">' +
2468
+ '<input type="checkbox" ' + edcal.isPrefChecked(edcal.wheelScrollPref) + 'value="true" id="wheel-support" ' +
2469
+ 'name="wheel-support" class="hide-column-tog" />' + edcal.str_opt_wheel +
2470
+ '</label>' +
2471
+ '</div>';
2472
 
2473
  /*
2474
  * Set up the number of posts option
2584
  humanMsg.displayMsg(edcal.str_weekserror);
2585
  return;
2586
  }
2587
+
2588
+ edcal.enableMouseWheel();
2589
 
2590
  var url = edcal.ajax_url() + '&action=edcal_saveoptions&weeks=' +
2591
  encodeURIComponent(jQuery('#edcal_weeks_pref').val());
2592
 
2593
+ jQuery('div.calendar-fields-prefs').find('input, textarea, select').each(function() {
2594
  url += '&' + encodeURIComponent(this.name) + '=' + encodeURIComponent(this.checked);
2595
  });
2596
 
edcal.min.js CHANGED
@@ -2,68 +2,70 @@ var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.findInternal=function(a,b,c){a
2
  $jscomp.getGlobal=function(a){return"undefined"!=typeof window&&window===a?a:"undefined"!=typeof global&&null!=global?global:a};$jscomp.global=$jscomp.getGlobal(this);$jscomp.polyfill=function(a,b,c,d){if(b){c=$jscomp.global;a=a.split(".");for(d=0;d<a.length-1;d++){var e=a[d];e in c||(c[e]={});c=c[e]}a=a[a.length-1];d=c[a];b=b(d);b!=d&&null!=b&&$jscomp.defineProperty(c,a,{configurable:!0,writable:!0,value:b})}};
3
  $jscomp.polyfill("Array.prototype.find",function(a){return a?a:function(a,c){return $jscomp.findInternal(this,a,c).v}},"es6-impl","es3");$jscomp.checkStringArgs=function(a,b,c){if(null==a)throw new TypeError("The 'this' value for String.prototype."+c+" must not be null or undefined");if(b instanceof RegExp)throw new TypeError("First argument to String.prototype."+c+" must not be a regular expression");return a+""};
4
  $jscomp.polyfill("String.prototype.endsWith",function(a){return a?a:function(a,c){var b=$jscomp.checkStringArgs(this,a,"endsWith");a+="";void 0===c&&(c=b.length);c=Math.max(0,Math.min(c|0,b.length));for(var e=a.length;0<e&&0<c;)if(b[--c]!=a[--e])return!1;return 0>=e}},"es6-impl","es3");
5
- var edcal={NO_DATE:"00000000",weeksPref:3,statusPref:!0,authorPref:!1,timePref:!0,doFeedbackPref:!0,isMoving:!1,inDrag:!1,isDragScrolling:!1,internalDateFormat:"ddMMyyyy",position:null,firstDayOfMonth:null,firstDayOfNextMonth:null,wp_dateFormat:"yyyy-MM-dd",cacheDates:[],tID:null,steps:0,CONCURRENCY_ERROR:4,PERMISSION_ERROR:5,NONCE_ERROR:6,currentDirection:!0,_wDate:Date.today(),moveDate:null,startOfWeek:null,posts:[],windowHeight:0,ltr:"ltr",isDraftsDrawerVisible:!1,init:function(){if(0!==jQuery("#edcal_scrollable").length){"true"===
6
- jQuery.cookie("edcal_drafts_drawer")&&(edcal.isDraftsDrawerVisible=!0,edcal.setDraftsDrawerVisible(edcal.isDraftsDrawerVisible));jQuery("#loading").hide();jQuery("#edcal_scrollable").css("height",edcal.getCalHeight()+"px");edcal.windowHeight=jQuery(window).height();edcal.createDaysHeader();jQuery("#edcal_scrollable").scrollable({vertical:!0,size:edcal.weeksPref,keyboard:!1,keyboardSteps:1,speed:100,easing:"linear"});var a=jQuery("#edcal_scrollable").scrollable();a.getConf().keyboard=!1;var b=jQuery.cookie("edcal_date");
7
- b?(b=Date.parseExact(b,"yyyy-dd-MM"),edcal.output("Resetting to date from the edcal_Date cookie: "+b)):b=Date.today();edcal.moveTo(b.clone());a.onBeforeSeek(function(a,b){return!1});jQuery(document).bind("keydown",function(a){if(27===a.keyCode)return!1;if(!jQuery("#edcal_quickedit").is(":visible"))if(40!==a.keyCode||a.altKey||a.ctrlKey)if(38!==a.keyCode||a.altKey||a.ctrlKey){if(34===a.keyCode&&!a.altKey&&!a.ctrlKey||40===a.keyCode&&a.ctrlKey)return edcal.move(edcal.weeksPref,!0),!1;if(33===a.keyCode&&
8
- !a.altKey&&!a.ctrlKey||38===a.keyCode&&a.ctrlKey)return edcal.move(edcal.weeksPref,!1),!1}else return edcal.move(1,!1),!1;else return edcal.move(1,!0),!1});edcal.getPosts(edcal.nextStartOfWeek(b).add(-3).weeks(),edcal.nextStartOfWeek(b).add(edcal.weeksPref+3).weeks());jQuery("#moveToToday").click(function(){edcal.moveTo(Date.today());edcal.getPosts(edcal.nextStartOfWeek(Date.today()).add(-3).weeks(),edcal.nextStartOfWeek(Date.today()).add(edcal.weeksPref+3).weeks());return!1});jQuery("#moveToLast").click(function(){if("-1"!==
9
- edcal.lastPostDate){var a=Date.parseExact(edcal.lastPostDate,"ddMMyyyy");edcal.moveTo(a);edcal.getPosts(edcal.nextStartOfWeek(a).add(-3).weeks(),edcal.nextStartOfWeek(a).add(edcal.weeksPref+3).weeks());return!1}});jQuery("#prevmonth").click(function(){edcal.move(edcal.weeksPref,!1);return!1});jQuery("#nextmonth").click(function(){edcal.move(edcal.weeksPref,!0);return!1});jQuery("#newPostScheduleButton").on("click",function(a){if(jQuery(this).hasClass("disabled"))return!1;jQuery(this).addClass("disabled");
10
- return edcal.savePost(null,!1,!0)});jQuery("#edcal-title-new-field").bind("keyup",function(a){0<jQuery("#edcal-title-new-field").val().length&&(!jQuery("#edcal-time").is(":visible")||0<jQuery("#edcal-time").val().length)?jQuery("#newPostScheduleButton").removeClass("disabled"):jQuery("#newPostScheduleButton").addClass("disabled");if(13===a.keyCode)return edcal.savePost(null,!0)});jQuery("#edcal-status").bind("change",function(a){edcal.updatePublishButton()});jQuery("#edcal_weeks_pref").on("keyup",
11
- function(a){0<jQuery("#edcal_weeks_pref").val().length?jQuery("#edcal_applyoptions").removeClass("disabled"):jQuery("#edcal_applyoptions").addClass("disabled");13===a.keyCode&&edcal.saveOptions()});edcal.savePosition();edcal.addOptionsSection();jQuery("#edcal-time").timePicker({show24Hours:"H:i"===edcal.timeFormat,separator:":",step:30});jQuery("#showdraftsdrawer").click(function(){edcal.setDraftsDrawerVisible(!edcal.isDraftsDrawerVisible)})}},setDraftsDrawerVisible:function(a,b){var c=jQuery("#showdraftsdrawer");
12
- c.hasClass("isLoaded")?b&&b():(c.addClass("isLoaded"),edcal.setupDraftsdrawer(b));a?(jQuery("#cal_cont").css({"margin-right":"13.5%"}),jQuery("#draftsdrawer_cont").css({display:"block",width:"13%"}),c.html(edcal.str_hidedrafts)):(jQuery("#cal_cont").css({"margin-right":"0"}),jQuery("#draftsdrawer_cont").css({display:"none",width:"0"}),c.html(edcal.str_showdrafts));edcal.isDraftsDrawerVisible=a;jQuery.cookie("edcal_drafts_drawer",a,{expires:2060})},setupDraftsdrawer:function(a){jQuery("#draftsdrawer_loading").css({display:"block"});
13
- edcal.getPosts(edcal.NO_DATE,null,function(){edcal.initDraftsdrawer();a&&a()})},initDraftsdrawer:function(){var a=""+('<a href="#" adddate="'+edcal.NO_DATE+'" class="daynewlink" style="margin-top: 5px;"title="'+edcal.str_newdraft+'" id="unscheduledNewLink" onclick="edcal.addDraft(); return false;">'+edcal.str_addDraftLink+"</a>");a=a+'<ul class="postlist">'+edcal.getPostItems(edcal.NO_DATE);a+="</ul>";edcal.draggablePost("#row"+edcal._wDate.toString(edcal.internalDateFormat)+" li.post");edcal.makeDroppable(jQuery("#draftsdrawer div.day"));
14
- jQuery("#unscheduled").append(a);jQuery("#draftsdrawer_loading").css({display:"none"});a=jQuery("#cal_cont");jQuery("#unscheduled ul.postlist").css("min-height",a.height()-10-jQuery("#draftsdrawer .draftsdrawerheadcont").height()-jQuery("#unscheduledNewLink").outerHeight());jQuery("#unscheduled").mouseout(function(){jQuery("#unscheduledNewLink").hide()}).mouseover(function(){jQuery("#unscheduledNewLink").show()})},alignGrid:function(a,b,c,d,e){if("draftsdrawer"!==jQuery(a).parent().attr("id")){var f=
15
- 0,h=0,g=1;jQuery(a).each(function(){jQuery(this).css("position","relative");var a=jQuery(this).children("div");if(1===b||"ltr"===edcal.ltr)for(var k=0;k<a.length;k++)a.eq(k).css({width:c+"%",height:d+"%",position:"absolute",left:f+"%",top:h+"%"}),0===g%b?(f=0,h+=d+e):f+=c+e,g++;else for(k=a.length-1;-1<k;k--)a.eq(k).css({width:c+"%",height:d+"%",position:"absolute",left:f+"%",top:h+"%"}),0===g%b?(f=0,h+=d+e):f+=c+e,g++})}},alignCal:function(){edcal.alignGrid("#cal",1,100,100/edcal.weeksPref-1,1)},
16
- createDaysHeader:function(){var a=Date.today().next().sunday();edcal.nextStartOfWeek(a);var b='<div class="dayheadcont"><div class="dayhead firstday">'+a.add(edcal.startOfWeek).days().toString("dddd")+"</div>",b=b+('<div class="dayhead">'+a.add(1).days().toString("dddd")+"</div>"),b=b+('<div class="dayhead">'+a.add(1).days().toString("dddd")+"</div>"),b=b+('<div class="dayhead">'+a.add(1).days().toString("dddd")+"</div>"),b=b+('<div class="dayhead">'+a.add(1).days().toString("dddd")+"</div>"),b=b+
17
- ('<div class="dayhead">'+a.add(1).days().toString("dddd")+"</div>"),b=b+('<div class="dayhead lastday">'+a.add(1).days().toString("dddd")+"</div>");jQuery("#cal_cont").prepend(b);edcal.alignGrid(".dayheadcont",7,13.8,100,.5)},getDateClass:function(a){var b;var c=-1===a.compareTo(Date.today())?"beforeToday":"todayAndAfter";edcal.firstDayOfMonth||(edcal.firstDayOfMonth=Date.today().moveToFirstDayOfMonth().clearTime(),edcal.firstDayOfNextMonth=Date.today().moveToLastDayOfMonth().clearTime());a.between(edcal.firstDayOfMonth,
18
- edcal.firstDayOfNextMonth)?b="month-present":1===a.compareTo(edcal.firstDayOfMonth)?b="month-future":-1===a.compareTo(edcal.firstDayOfNextMonth)&&(b="month-past");"01"===a.toString("dd")&&(c+=" firstOfMonth");return b+" "+c},showAddPostLink:function(a){edcal.inDrag||(a=jQuery("#"+a+" a.daynewlink"),a.css("display","block"),a.bind("click",edcal.addPost))},hideAddPostLink:function(a){jQuery("#"+a+" a.daynewlink").hide().unbind("click",edcal.addPost)},createRow:function(a,b){for(var c=edcal._wDate.clone(),
19
- d='<div class="rowcont" id="row'+edcal._wDate.toString(edcal.internalDateFormat)+'"><div id="row'+edcal._wDate.toString(edcal.internalDateFormat)+'row" class="edcal_row">',e=0;7>e;e++)d+="<div onmouseover=\"edcal.showAddPostLink('"+c.toString(edcal.internalDateFormat)+"');\" onmouseout=\"edcal.hideAddPostLink('"+c.toString(edcal.internalDateFormat)+'\');" id="'+c.toString(edcal.internalDateFormat)+'" class="day '+edcal.getDateClass(c)+" "+c.toString("dddd").toLowerCase()+" month-"+c.toString("MM").toLowerCase()+
20
- '">',d+='<div class="dayobj">',d+='<a href="#" adddate="'+c.toString("MMMM d")+'" class="daynewlink" title="'+sprintf(edcal.str_newpost,edcal.chineseAposWorkaround(c.toString(Date.CultureInfo.formatPatterns.monthDay)))+'" onclick="return false;">'+edcal.str_addPostLink+"</a>",d="01"===c.toString("dd")?d+('<div class="daylabel">'+c.toString("MMM d")):d+('<div class="daylabel">'+c.toString("d")),d+="</div>",d+='<ul class="postlist">',d+=edcal.getPostItems(c.toString(edcal.internalDateFormat)),d+="</ul>",
21
- d+="</div>",d+="</div>",c.add(1).days();d+="</div></div>";b?a.append(d):a.prepend(d);edcal.alignGrid("#row"+edcal._wDate.toString(edcal.internalDateFormat)+"row",7,13.9,100,.5);edcal.draggablePost("#row"+edcal._wDate.toString(edcal.internalDateFormat)+" li.post");edcal.makeDroppable(jQuery("#row"+edcal._wDate.toString(edcal.internalDateFormat)+" > div > div.day"));return jQuery("row"+edcal._wDate.toString(edcal.internalDateFormat))},makeDroppable:function(a){a.droppable({hoverClass:"day-active",accept:function(a){return jQuery(this).hasClass("beforeToday")?
22
- a.hasClass("draft")?!0:!1:!0},greedy:!0,tolerance:"pointer",drop:function(a,c){a=c.draggable.parent().parent().parent().attr("id");edcal.doDrop(a,c.draggable.attr("id"),jQuery(this).attr("id"))}})},doDrop:function(a,b,c,d){var e=edcal.findPostForId(a,b);edcal.removePostFromMap(a,b);var f=jQuery("#"+b);f.detach();setTimeout(function(){f.remove()},500);jQuery("#"+c+" .postlist").append(edcal.createPostItem(e,c));a===c?edcal.draggablePost("#"+c+" .post"):edcal.changeDate(c,e,d)},draggablePost:function(a){jQuery(a).each(function(){var a=
23
- edcal.findPostForId(jQuery(this).parent().parent().parent().attr("id"),jQuery(this).attr("id"));edcal.isPostMovable(a)&&(jQuery(this).draggable({revert:"invalid",appendTo:"body",helper:"clone",distance:1,addClasses:!1,start:function(){edcal.inDrag=!0},stop:function(){edcal.inDrag=!1},drag:function(a,b){edcal.handleDrag(a,b)},scroll:!1,refreshPositions:!0}),jQuery(this).addClass("draggable"))})},handleDrag:function(a,b){edcal.isMoving||edcal.isDragScrolling||(edcal.isDragScrolling=!0,a.pageY<edcal.position.top+
24
- 10?edcal.move(1,!1):a.pageY>edcal.position.bottom-10&&edcal.move(1,!0),setTimeout(function(){edcal.isDragScrolling=!1},300))},removePostFromMap:function(a,b){if(edcal.posts[a])for(var c=0;c<edcal.posts[a].length;c++)if(edcal.posts[a][c]&&"post-"+edcal.posts[a][c].id===b)return edcal.posts[a][c]=null,!0;return!1},addPostItem:function(a,b){jQuery("#"+b+" > div > ul").append(edcal.createPostItem(a,b))},addPostItemDragAndToolltip:function(a){edcal.draggablePost("#"+a+" > div > ul > li")},deletePost:function(a,
25
- b){a=edcal.ajax_url()+"&action=edcal_deletepost&postid="+a;jQuery.ajax({url:a,type:"POST",processData:!1,timeout:1E5,dataType:"json",success:function(a){a.post.date_gmt===edcal.NO_DATE?edcal.removePostItem(a.post.date_gmt,"post-"+a.post.id):edcal.removePostItem(a.post.date,"post-"+a.post.id);a.error?a.error===edcal.NONCE_ERROR&&edcal.showError(edcal.checksum_error):edcal.output('Finished deleting the post: "'+a.post.title+'" with id:'+a.post.id);b&&b(a)},error:function(a){edcal.showError(edcal.general_error);
26
- a.responseText&&edcal.output("deletePost xhr.responseText: "+a.responseText)}})},confirmDelete:function(a){return confirm(edcal.str_del_msg1+a+edcal.str_del_msg2)?!0:!1},ajax_url:function(){return ajaxurl+"?_wpnonce="+edcal.wp_nonce},getMediaBar:function(){return jQuery("#cal_mediabar").html()},addPost:function(){jQuery("#newPostScheduleButton").addClass("disabled");var a=jQuery(this).parent().parent().attr("id"),b=edcal.defaultTime;"H:i"!==edcal.timeFormat&&"G:i"!==edcal.timeFormat&&(b+=" AM");a=
27
- {id:0,date:a,formatteddate:edcal.getDayFromDayId(a).toString(edcal.previewDateFormat),time:b};edcal.showForm(a);return!1},addDraft:function(){jQuery("#newPostScheduleButton").addClass("disabled");var a={id:0,date:Date.today(),formatteddate:edcal.NO_DATE,time:edcal.NO_DATE,status:"draft"};edcal.showForm(a);return!1},editPost:function(a){jQuery("#newPostScheduleButton").removeClass("disabled");edcal.getPost(a,edcal.showForm);return!1},savePost:function(a,b,c,d){if("undefined"===typeof a||null===a)a=
28
- edcal.serializePost();if(!a.title||""===a.title)return!1;jQuery("#edit-slug-buttons").addClass("tiploading");var e=a.time.toUpperCase();"12"===e.slice(0,2)&&"PM"===e.slice(e.length-2,e.length)?a.time="12:"+e.slice(3,5):"12"===e.slice(0,2)&&"AM"===e.slice(a.time.length-2,a.time.length)&&(a.time="00:"+e.slice(3,5));var e=""!==a.time?Date.parse(a.time):Date.parse(edcal.defaultTime);if(null!==e&&e!==edcal.NO_DATE){var f=e.format("H:i:s");var h=encodeURIComponent(edcal.getDayFromDayId(a.date).toString(edcal.wp_dateFormat)+
29
- " "+f)}else h=encodeURIComponent(a.date.toString(edcal.wp_dateFormat+" H:i:s"));f=edcal.ajax_url()+"&action=edcal_savepost";a="date="+h+"&title="+encodeURIComponent(a.title)+"&content="+encodeURIComponent(a.content)+"&id="+encodeURIComponent(a.id)+"&status="+encodeURIComponent(a.status)+"&orig_status="+encodeURIComponent(a.orig_status);if(null===e||e===edcal.NO_DATE)a+="&date_gmt="+encodeURIComponent("0000-00-00 00:00:00");edcal.getUrlVars().post_type&&(a+="&post_type="+encodeURIComponent(edcal.getUrlVars().post_type));
30
- c&&(a+="&dopublish="+encodeURIComponent("future"));jQuery.ajax({url:f,type:"POST",processData:!1,data:a,timeout:1E5,dataType:"json",success:function(a){jQuery("#edit-slug-buttons").removeClass("tiploading");jQuery("#edcal_quickedit").hide();jQuery("#edcal_scrollable").data("scrollable").getConf().keyboard=!0;if(a.error)return a.error===edcal.NONCE_ERROR&&edcal.showError(edcal.checksum_error),!1;if(a.post)if(b)window.location=a.post.editlink.replace("&amp;","&");else{var c=a.post.date;a.post.date_gmt===
31
- edcal.NO_DATE&&(c=a.post.date_gmt);a.post.id&&edcal.removePostItem(c,"post-"+a.post.id);edcal.addPostItem(a.post,c);edcal.addPostItemDragAndToolltip(c)}else edcal.showError("There was an error creating a new post for your blog.");d&&d(a);return!0},error:function(a){jQuery("#edit-slug-buttons").removeClass("tiploading");jQuery("#edcal_quickedit").hide();jQuery("#edcal_scrollable").data("scrollable").getConf().keyboard=!0;edcal.showError(edcal.general_error);a.responseText&&edcal.output("savePost xhr.responseText: "+
32
- a.responseText)}});return!1},serializePost:function(){var a={};jQuery("#edcal_quickedit").find("input, textarea, select").each(function(){a[this.name]=this.value});return a},showForm:function(a){edcal.resetForm();a.formatteddate===edcal.NO_DATE||a.date_gmt===edcal.NO_DATE?jQuery("#timeEditControls").hide():jQuery("#timeEditControls").show();jQuery("#edcal_quickedit").center().show();jQuery("#edcal_scrollable").data("scrollable").getConf().keyboard=!1;a.id?(jQuery("#tooltiptitle").text(sprintf(edcal.str_edit_post_title,
33
- a.typeTitle,edcal.getDayFromDayId(a.date).toString(edcal.previewDateFormat))),jQuery("#edcal-title-new-field").val(a.title),jQuery("#content").val(a.content)):a.formatteddate===edcal.NO_DATE?jQuery("#tooltiptitle").text(edcal.str_newdraft_title):jQuery("#tooltiptitle").text(edcal.str_newpost_title+a.formatteddate);"future"===a.status&&jQuery("#newPostScheduleButton").text(edcal.str_update);a.status?(jQuery("#edcal-status").val(a.status),edcal.updatePublishButton()):(0!==jQuery("#edcal-status option[value="+
34
- edcal.defaultStatus+"]").length?jQuery("#edcal-status").val(edcal.defaultStatus):jQuery("#edcal-status").val("draft"),jQuery("#newPostScheduleButton").text(edcal.str_save));a.status&&"draft"!==a.status&&"future"!==a.status&&"pending"!==a.status&&(jQuery("#edcal-status").attr("disabled","true"),jQuery("#edcal-status").append('<option class="temp" value="'+a.status+'">'+a.status+"</option>"),jQuery("#edcal-status").val(a.status));a.formatteddate!==edcal.NO_DATE&&-1===edcal.getDayFromDayId(a.date).compareTo(Date.today())&&
35
- jQuery("#edcal-status").attr("disabled","true");var b=a.time;jQuery("#edcal-time").val(b);jQuery("#edcal-date").val(a.date);jQuery("#edcal-id").val(a.id);jQuery("#edcal-title-new-field").focus();jQuery("#edcal-title-new-field").select()},hideForm:function(){jQuery("#edcal_quickedit").hide();jQuery("#edcal_scrollable").data("scrollable").getConf().keyboard=!0;edcal.resetForm()},resetForm:function(){jQuery("#edcal_quickedit").find("input, textarea, select").each(function(){this.value=""});jQuery("#edcal-status").removeAttr("disabled");
36
- jQuery("#newPostScheduleButton").text(edcal.str_publish);jQuery("#tooltiptitle").text("");jQuery("#edcal-status").removeAttr("disabled");jQuery("#edcal-status .temp").remove()},createPostItem:function(a,b){edcal.posts[b]||(edcal.posts[b]=[]);edcal.posts[b][edcal.posts[b].length]=a;return edcal.getPostItemString(a)},findPostForId:function(a,b){if(edcal.posts[a])for(var c=0;c<edcal.posts[a].length;c++)if(edcal.posts[a][c]&&"post-"+edcal.posts[a][c].id===b)return edcal.posts[a][c];return null},removePostItem:function(a,
37
- b){if(edcal.findPostForId(a,b))for(var c=0;c<edcal.posts[a].length;c++)edcal.posts[a][c]&&"post-"+edcal.posts[a][c].id===b&&(edcal.posts[a][c]=null);jQuery("#"+b).remove()},getPostItems:function(a){var b="";if(edcal.posts[a]){var c=edcal.posts[a];if(50>c.length)for(a=0;a<c.length;a++)c[a]&&(b+=edcal.getPostItemString(c[a]));else edcal.addPostItems(a,0,50)}return b},addPostItems:function(a,b,c){var d=edcal.posts[a],e="";setTimeout(function(){for(var f=b;f<b+c&&f<d.length;f++)d[f]&&(e+=edcal.getPostItemString(d[f]));
38
- jQuery("#"+a+" ul").append(e);b+c<d.length&&edcal.addPostItems(a,b+c,50)},100)},showActionLinks:function(a){edcal.actionTimer&&clearTimeout(edcal.actionTimer);var b=edcal.findPostForId(jQuery("#"+a).parent().parent().parent().attr("id"),a);if(!edcal.inDrag&&edcal.isPostEditable(b)){var c=jQuery("#"+a+" > div.postactions");edcal.actionLinksElem&&edcal.actionLinksElem.get(0)!==c.get(0)&&edcal.actionLinksElem.slideUp();edcal.actionLinksElem=c;edcal.actionTimer=setTimeout(function(){c.slideDown();if(c.parent().position().top+
39
- c.parent().height()>c.parent().parent().height()){var b=jQuery("#"+a+" > div.postactions").parent().parent();b.scrollTop(b.scrollTop()+45)}},250)}},hideActionLinks:function(a){edcal.actionTimer&&clearTimeout(edcal.actionTimer);edcal.actionTimer=setTimeout(function(){jQuery("#"+a+" > div.postactions").slideUp();edcal.actionLinksElem=null},1E3)},isPostMovable:function(a){return a.editlink&&"publish"!==a.status},isPostEditable:function(a){return a.editlink},getPostEditableClass:function(a){return a.editlink?
40
- "":"readonly"},getPostItemString:function(a){var b=a.title;""===b&&(b="[No Title]");edcal.statusPref&&("draft"===a.status&&"1"===a.sticky?b+=edcal.str_draft_sticky:"pending"===a.status&&"1"===a.sticky?b+=edcal.str_pending_sticky:"1"===a.sticky?b+=edcal.str_sticky:"pending"===a.status?b+=edcal.str_pending:"draft"===a.status?b+=edcal.str_draft:"publish"!==a.status&&"future"!==a.status&&"pending"!==a.status&&(b+=" ["+a.status+"]"));edcal.timePref&&(b='<span class="posttime">'+a.formattedtime+"</span> "+
41
- b);edcal.authorPref&&(b=sprintf(edcal.str_by,b,'<span class="postauthor">'+a.author+"</span>"));return edcal.isPostMovable(a)?"<li onmouseover=\"edcal.showActionLinks('post-"+a.id+"');\" onmouseout=\"edcal.hideActionLinks('post-"+a.id+'\');" id="post-'+a.id+'" class="post '+a.status+" "+edcal.getPostEditableClass(a)+a.slugs+'"><div class="postlink "><span>'+b+'</span></div><div class="postactions"><a href="'+a.editlink+'">'+edcal.str_edit+'</a> | <a href="#" onclick="edcal.editPost('+a.id+'); return false;">'+
42
- edcal.str_quick_edit+'</a> | <a href="'+a.dellink+'" onclick="return edcal.confirmDelete(\''+a.title+"');\">"+edcal.str_del+'</a> | <a href="'+a.permalink+'">'+edcal.str_view+"</a></div></li>":"<li onmouseover=\"edcal.showActionLinks('post-"+a.id+"');\" onmouseout=\"edcal.hideActionLinks('post-"+a.id+'\');" id="post-'+a.id+'" class="post '+a.status+" "+edcal.getPostEditableClass(a)+'"><div class="postlink "><span>'+b+'</span></div><div class="postactions"><a href="'+a.editlink+'">'+edcal.str_republish+
43
- '</a> | <a href="'+a.permalink+'">'+edcal.str_view+"</a></div></li>"},setClassforToday:function(){jQuery("#"+Date.today().toString(edcal.internalDateFormat)).addClass("today")},getCalHeight:function(){var a=jQuery(window).height()-jQuery("#footer").height()-jQuery("#wphead").height()-150;return Math.max(a,500)},move:function(a,b,c){if(!jQuery("#edcal_quickedit").is(":visible")){edcal.currentDirection!==b&&(edcal._wDate=b?edcal._wDate.add(7*(edcal.weeksPref+7)).days():edcal._wDate.add(-(7*(edcal.weeksPref+
44
- 7))).days(),edcal.steps=0,edcal.moveDate=edcal._wDate);edcal.currentDirection=b;var d;if(b)for(d=0;d<a;d++)jQuery("#cal > div:first").remove(),edcal.createRow(jQuery("#cal"),!0),edcal._wDate.add(7).days();else for(d=0;d<a;d++)jQuery("#cal > div:last").remove(),edcal.createRow(jQuery("#cal"),!1),edcal._wDate.add(-7).days();edcal.alignCal();edcal.setClassforToday();edcal.setDateLabel();edcal.steps+=a;edcal.tID?clearTimeout(edcal.tID):edcal.moveDate=edcal._wDate;edcal.tID=setTimeout(function(){b?edcal.getPosts(edcal._wDate.clone().add(-7*
45
- (edcal.steps+1)).days(),edcal._wDate.clone(),c):edcal.getPosts(edcal._wDate.clone(),edcal._wDate.clone().add(7*(edcal.steps+1)).days(),c);edcal.steps=0;edcal.tID=null;edcal.moveDate=edcal._wDate},1E3);b?jQuery.cookie("edcal_date",edcal._wDate.clone().add(-(edcal.weeksPref+4)).weeks().toString("yyyy-dd-MM")):jQuery.cookie("edcal_date",edcal._wDate.clone().add(3).weeks().toString("yyyy-dd-MM"))}},getDayFromDayId:function(a){return Date.parseExact(a.substring(2,4)+"/"+a.substring(0,2)+"/"+a.substring(4),
46
- "MM/dd/yyyy")},setDateLabel:function(a){var b=jQuery("#edcal_scrollable").scrollable().getVisibleItems();a=edcal.getDayFromDayId(b.eq(0).children(".edcal_row").children(".day:first").attr("id"));b=edcal.getDayFromDayId(b.eq(edcal.weeksPref-1).children(".edcal_row").children(".day:last").attr("id"));jQuery("#currentRange").text(edcal.chineseAposWorkaround(a.toString(Date.CultureInfo.formatPatterns.yearMonth))+" - "+edcal.chineseAposWorkaround(b.toString(Date.CultureInfo.formatPatterns.yearMonth)))},
47
- nextStartOfWeek:function(a){a=a.clone();if(null===edcal.startOfWeek)if(edcal.locale){var b=edcal.locale.toUpperCase();edcal.endsWith(b,"AS")||edcal.endsWith(b,"AZ")||edcal.endsWith(b,"BW")||edcal.endsWith(b,"CA")||edcal.endsWith(b,"CN")||edcal.endsWith(b,"FO")||edcal.endsWith(b,"GB")||edcal.endsWith(b,"GE")||edcal.endsWith(b,"GL")||edcal.endsWith(b,"GU")||edcal.endsWith(b,"HK")||edcal.endsWith(b,"IE")||edcal.endsWith(b,"IL")||edcal.endsWith(b,"IN")||edcal.endsWith(b,"IS")||edcal.endsWith(b,"JM")||
48
- edcal.endsWith(b,"JP")||edcal.endsWith(b,"KG")||edcal.endsWith(b,"KR")||edcal.endsWith(b,"LA")||edcal.endsWith(b,"MH")||edcal.endsWith(b,"MN")||edcal.endsWith(b,"MO")||edcal.endsWith(b,"MP")||edcal.endsWith(b,"MT")||edcal.endsWith(b,"NZ")||edcal.endsWith(b,"PH")||edcal.endsWith(b,"PK")||edcal.endsWith(b,"SG")||edcal.endsWith(b,"SY")||edcal.endsWith(b,"TH")||edcal.endsWith(b,"TT")||edcal.endsWith(b,"TW")||edcal.endsWith(b,"UM")||edcal.endsWith(b,"US")||edcal.endsWith(b,"UZ")||edcal.endsWith(b,"VI")||
49
- edcal.endsWith(b,"ZW")?edcal.startOfWeek=0:edcal.endsWith(b,"MV")?edcal.startOfWeek=5:edcal.endsWith(b,"AF")||edcal.endsWith(b,"BH")||edcal.endsWith(b,"DJ")||edcal.endsWith(b,"DZ")||edcal.endsWith(b,"EG")||edcal.endsWith(b,"ER")||edcal.endsWith(b,"ET")||edcal.endsWith(b,"IQ")||edcal.endsWith(b,"IR")||edcal.endsWith(b,"JO")||edcal.endsWith(b,"KE")||edcal.endsWith(b,"KW")||edcal.endsWith(b,"LY")||edcal.endsWith(b,"MA")||edcal.endsWith(b,"OM")||edcal.endsWith(b,"QA")||edcal.endsWith(b,"SA")||edcal.endsWith(b,
50
- "SD")||edcal.endsWith(b,"SO")||edcal.endsWith(b,"TN")||edcal.endsWith(b,"YE")?edcal.startOfWeek=6:edcal.startOfWeek=1}else edcal.startOfWeek=0;return a.next().sunday().add(edcal.startOfWeek).days()},endsWith:function(a,b){return a.match(b+"$")===b},moveTo:function(a){edcal.isMoving=!0;jQuery("#cal").empty();jQuery.cookie("edcal_date",a.toString("yyyy-dd-MM"));edcal._wDate=edcal.nextStartOfWeek(a).add(-21).days();edcal.currentDirection=!0;a=edcal.weeksPref+6;for(var b=0;b<a;b++)edcal.createRow(jQuery("#cal"),
51
- !0),edcal._wDate.add(7).days();edcal.alignCal();jQuery("#edcal_scrollable").scrollable().move(2);edcal.setDateLabel();edcal.setClassforToday();edcal.isMoving=!1},savePosition:function(){var a=jQuery("#edcal_scrollable"),b=jQuery("#cal_cont");edcal.position={top:a.offset().top,bottom:a.offset().top+a.height()};jQuery("#edcal_poststyle").remove();a=jQuery(".rowcont:eq(2) .dayobj:first").height()-jQuery(".rowcont:eq(2) .daylabel:first").height()-6;jQuery("head").append('<style id="edcal_poststyle" type="text/css">.ui-draggable-dragging {width: '+
52
- (jQuery(".rowcont:eq(2) .day:first").width()-5)+"px;}.postlist {height: "+a+"px;}</style>");jQuery("#draftsdrawer").css("height",b.height());jQuery("#draftsdrawer .day").css("min-height",b.height()-10-jQuery("#draftsdrawer .draftsdrawerheadcont").height())},addFeedbackSection:function(){3<edcal.visitCount&&edcal.doFeedbackPref&&jQuery("#edcal_main_title").after(edcal.str_feedbackmsg)},doFeedback:function(){jQuery.getScript("http://www.zackgrossbart.com/edcal/mint/?js",function(){edcal.saveFeedbackPref()})},
53
- noFeedback:function(){jQuery("#feedbacksection").hide("fast");edcal.saveFeedbackPref()},saveFeedbackPref:function(){var a=edcal.ajax_url()+"&action=edcal_saveoptions&dofeedback="+encodeURIComponent("done");jQuery.ajax({url:a,type:"POST",processData:!1,timeout:1E5,dataType:"text",success:function(a){jQuery("#feedbacksection").html(edcal.str_feedbackdone);setTimeout(function(){jQuery("#feedbacksection").hide("slow")},5E3)},error:function(a){edcal.showError(edcal.general_error);a.responseText&&edcal.output("saveOptions xhr.responseText: "+
54
- a.responseText)}})},updatePublishButton:function(){"future"===jQuery("#edcal-status").val()&&jQuery("#newPostScheduleButton").text(edcal.str_publish);"pending"===jQuery("#edcal-status").val()?jQuery("#newPostScheduleButton").text(edcal.str_review):jQuery("#newPostScheduleButton").text(edcal.str_save)},changeDate:function(a,b,c){var d=a===edcal.NO_DATE,e=b.date_gmt===edcal.NO_DATE,f=d?"0000-00-00":edcal.getDayFromDayId(a).toString(edcal.wp_dateFormat),h=e?b.date_gmt:edcal.getDayFromDayId(b.date).toString(edcal.wp_dateFormat);
55
- d&&(b.status="draft");f=edcal.ajax_url()+"&action=edcal_changedate&postid="+b.id+"&postStatus="+b.status+"&newdate="+f+"&olddate="+h;jQuery("#post-"+b.id).addClass("loadingclass");jQuery.ajax({url:f,type:"POST",processData:!1,timeout:1E5,dataType:"json",success:function(b){b.error&&(edcal.removePostItem(a,"post-"+b.post.id),b.error===edcal.CONCURRENCY_ERROR?edcal.displayMessage(edcal.concurrency_error+"<br />"+b.post.title):b.error===edcal.PERMISSION_ERROR?edcal.displayMessage(edcal.permission_error):
56
- b.error===edcal.NONCE_ERROR&&edcal.displayMessage(edcal.checksum_error));var f=d?"00000000":b.post.date,g=e?a:f;edcal.removePostItem(f,"post-"+b.post.id);edcal.addPostItem(b.post,g);edcal.addPostItemDragAndToolltip(g);c&&c(b)},error:function(a,b,c){edcal.showError(edcal.general_error);edcal.output("textStatus: "+b);edcal.output("error: "+c);a.responseText&&edcal.output("changeDate xhr.responseText: "+a.responseText)}})},getPosts:function(a,b,c){b||(b="");edcal.cacheDates[a]?c&&c():(edcal.cacheDates[a]=
57
- !0,b=edcal.ajax_url()+"&action=edcal_posts&from="+a.toString("yyyy-MM-dd")+"&to="+b.toString("yyyy-MM-dd"),edcal.getUrlVars().post_type&&(b+="&post_type="+encodeURIComponent(edcal.getUrlVars().post_type)),jQuery("#loading").show(),jQuery.ajax({url:b,type:"GET",processData:!1,timeout:1E5,dataType:"text",success:function(b){jQuery("#loading").hide();var d=null;try{d=JSON.parseIt(b)}catch(l){edcal.showFatalError(edcal.str_fatal_parse_error+l.message);window.console&&console.error(l);return}if(d.error)d.error===
58
- edcal.NONCE_ERROR&&edcal.showError(edcal.checksum_error);else{for(var f=[],h=d.length;0<=h;h--){var g=d[h];g&&"trash"!==g.status&&(g.date=g.date.replace(g.date.substring(2,3),g.date.substring(2,3).toUpperCase()),"00000000"===a&&(g.date=a),edcal.removePostItem(g.date,"post-"+g.id),edcal.addPostItem(g,g.date),f[f.length]=g.date)}setTimeout(function(){jQuery.each(f,function(a,b){edcal.addPostItemDragAndToolltip(b)})},300);c&&c(b)}},error:function(a){edcal.showError(edcal.general_error);a.responseText&&
59
- edcal.output("getPosts xhr.responseText: "+a.responseText)}}))},getPost:function(a,b){if(0===a)return!1;jQuery("#loading").show();a=edcal.ajax_url()+"&action=edcal_getpost&postid="+a;edcal.getUrlVars().post_type&&(a+="&post_type="+encodeURIComponent(edcal.getUrlVars().post_type));jQuery.ajax({url:a,type:"GET",processData:!1,timeout:1E5,dataType:"json",success:function(a){jQuery("#loading").hide();edcal.output("xhr for getPost returned: "+a);if(a.error)return a.error===edcal.NONCE_ERROR&&edcal.showError(edcal.checksum_error),
60
- !1;"function"===typeof b&&b(a.post);return a.post},error:function(a){jQuery("#loading").hide();edcal.showError(edcal.general_error);a.responseText&&edcal.output("getPost xhr.responseText: "+a.responseText);return!1}});return!0},addOptionsSection:function(){var a='<div class="hide-if-no-js screen-meta-toggle" id="screen-options-link-wrap"><a class="show-settings" id="show-edcal-settings-link" onclick="edcal.toggleOptions(); return false;" href="#" >'+edcal.str_screenoptions+"</a></div>";0===jQuery("#screen-meta-links").length&&
61
- jQuery("#screen-meta").after('<div id="screen-meta-links"></div>');jQuery("#screen-meta-links").append(a)},toggleOptions:function(){if(edcal.helpMeta)jQuery("#contextual-help-wrap").slideUp("fast"),jQuery("#contextual-help-wrap").html(edcal.helpMeta),edcal.helpMeta=null,jQuery("#show-edcal-settings-link").removeClass("screen-meta-active"),jQuery("#contextual-help-link-wrap").css("visibility","");else{edcal.helpMeta=jQuery("#contextual-help-wrap").html();for(var a='<div class="metabox-prefs" id="calendar-fields-prefs"><h5>'+
62
- edcal.str_show_opts+'</h5><label for="author-hide"><input type="checkbox" '+edcal.isPrefChecked(edcal.authorPref)+'value="true" id="author-hide" name="author-hide" class="hide-column-tog" />'+edcal.str_opt_author+'</label><label for="status-hide"><input type="checkbox" '+edcal.isPrefChecked(edcal.statusPref)+'value="true" id="status-hide" name="status-hide" class="hide-column-tog" />'+edcal.str_opt_status+'</label><label for="time-hide"><input type="checkbox" '+edcal.isPrefChecked(edcal.timePref)+
63
- 'value="true" id="time-hide" name="time-hide" class="hide-column-tog" />'+edcal.str_opt_time+"</label></div>",a=a+('<div class="metabox-prefs"><h5>'+edcal.str_show_title+'</h5><select id="edcal_weeks_pref" class="screen-per-page" title="'+edcal.str_weekstt+'"> '),b=parseInt(edcal.weeksPref,10),c=1;9>c;c++)a=c===b?a+('<option selected="true">'+c+"</option>"):a+("<option>"+c+"</option>");a+="</select>"+edcal.str_opt_weeks+"</div>";a+='<br /><button id="edcal_applyoptions" onclick="edcal.saveOptions(); return false;" class="save button">'+
64
- edcal.str_apply+"</button>";jQuery("#contextual-help-wrap").html(a);jQuery("#contextual-help-link-wrap").css("visibility","hidden");jQuery("#contextual-help-wrap").slideDown("normal");jQuery("#screen-meta").show();jQuery("#show-edcal-settings-link").addClass("screen-meta-active")}},generateColorPicker:function(a,b,c){a='<div id="'+b+'" class="optionscolorrow">'+('<span style="background-color: '+c+';" class="colorlabel"> '+a+"</span> ");var d="lightred orange yellow lightgreen lightblue purple lightgray".split(" ");
65
- edcal.output("colors.length: "+d.length);for(var e=0;e<d.length;e++)a+='<a href="#" class="optionscolor ',d[e]===c&&(a+="colorselected"),a+='" class='+b+d[e]+'" style="background-color: '+d[e]+"; left: "+(20*e+50)+'px" onclick="edcal.selectColor(\''+b+"', '"+d[e]+"'); return false;\"></a>";return a+"</div>"},selectColor:function(a,b){edcal.output("selectColor("+a+", "+b+")");jQuery("#"+a+" .colorlabel").css("background-color",b);jQuery("#"+a+" .colorselected").removeClass("colorselected");jQuery("#"+
66
- a+"value").addClass("colorselected")},isPrefChecked:function(a){return a?' checked="checked" ':""},saveOptions:function(){var a=parseInt(jQuery("#edcal_weeks_pref").val(),10);if(1>a||8<a)humanMsg.displayMsg(edcal.str_weekserror);else{var b=edcal.ajax_url()+"&action=edcal_saveoptions&weeks="+encodeURIComponent(jQuery("#edcal_weeks_pref").val());jQuery("#calendar-fields-prefs").find("input, textarea, select").each(function(){b+="&"+encodeURIComponent(this.name)+"="+encodeURIComponent(this.checked)});
67
- jQuery.ajax({url:b,type:"POST",processData:!1,timeout:1E5,dataType:"text",success:function(a){window.location.href=window.location.href},error:function(a){edcal.showError(edcal.general_error);a.responseText&&edcal.output("saveOptions xhr.responseText: "+a.responseText)}})}},output:function(a){window.console&&console.log(a)},showError:function(a){window.console&&console.error(a);edcal.displayMessage(a)},displayMessage:function(a){humanMsg.displayMsg(a)},getUrlVars:function(){for(var a=[],b,c=window.location.href.slice(window.location.href.indexOf("?")+
68
- 1).split("&"),d=0;d<c.length;d++)b=c[d].split("="),a.push(b[0]),a[b[0]]=b[1];return a},showFatalError:function(a){jQuery("#edcal_main_title").after('<div class="error below-h2" id="message"><p>'+edcal.str_fatal_error+a+"<br></p></div>");window.console&&console.error(a)},chineseAposWorkaround:function(a){return 0===Date.CultureInfo.name.indexOf("zh")||0===Date.CultureInfo.name.indexOf("ja")?a.replace(/'/g,""):a}};
69
- jQuery.fn.center=function(){this.css("position","absolute");this.css("top",(jQuery(window).height()-this.outerHeight())/2+jQuery(window).scrollTop()+"px");this.css("left",(jQuery(window).width()-this.outerWidth())/2+jQuery(window).scrollLeft()+"px");return this};jQuery(document).ready(function(){try{edcal.init()}catch(a){edcal.output("Error loading calendar: "+a),edcal.showFatalError(a.description)}edcal.getUrlVars().qunit&&edcal_test.runTests()});
 
 
2
  $jscomp.getGlobal=function(a){return"undefined"!=typeof window&&window===a?a:"undefined"!=typeof global&&null!=global?global:a};$jscomp.global=$jscomp.getGlobal(this);$jscomp.polyfill=function(a,b,c,d){if(b){c=$jscomp.global;a=a.split(".");for(d=0;d<a.length-1;d++){var e=a[d];e in c||(c[e]={});c=c[e]}a=a[a.length-1];d=c[a];b=b(d);b!=d&&null!=b&&$jscomp.defineProperty(c,a,{configurable:!0,writable:!0,value:b})}};
3
  $jscomp.polyfill("Array.prototype.find",function(a){return a?a:function(a,c){return $jscomp.findInternal(this,a,c).v}},"es6-impl","es3");$jscomp.checkStringArgs=function(a,b,c){if(null==a)throw new TypeError("The 'this' value for String.prototype."+c+" must not be null or undefined");if(b instanceof RegExp)throw new TypeError("First argument to String.prototype."+c+" must not be a regular expression");return a+""};
4
  $jscomp.polyfill("String.prototype.endsWith",function(a){return a?a:function(a,c){var b=$jscomp.checkStringArgs(this,a,"endsWith");a+="";void 0===c&&(c=b.length);c=Math.max(0,Math.min(c|0,b.length));for(var e=a.length;0<e&&0<c;)if(b[--c]!=a[--e])return!1;return 0>=e}},"es6-impl","es3");
5
+ var edcal={NO_DATE:"00000000",weeksPref:3,statusPref:!0,authorPref:!1,timePref:!0,wheelScrollPref:!0,doFeedbackPref:!0,isMoving:!1,inDrag:!1,isDragScrolling:!1,internalDateFormat:"ddMMyyyy",position:null,firstDayOfMonth:null,firstDayOfNextMonth:null,wp_dateFormat:"yyyy-MM-dd",cacheDates:[],tID:null,steps:0,CONCURRENCY_ERROR:4,PERMISSION_ERROR:5,NONCE_ERROR:6,currentDirection:!0,_wDate:Date.today(),moveDate:null,startOfWeek:null,posts:[],windowHeight:0,ltr:"ltr",isDraftsDrawerVisible:!1,enableMouseWheel:function(){edcal.wheelScrollPref?
6
+ jQuery("#edcal_scrollable").bind("mousewheel",function(a,b){a=Math.abs(b);!edcal.isMoving&&.2<a&&edcal.move(1,0<b?!1:!0);return!1}):jQuery("#edcal_scrollable").unbind("mousewheel")},init:function(){if(0!==jQuery("#edcal_scrollable").length){"true"===jQuery.cookie("edcal_drafts_drawer")&&(edcal.isDraftsDrawerVisible=!0,edcal.setDraftsDrawerVisible(edcal.isDraftsDrawerVisible));jQuery("#loading").hide();jQuery("#edcal_scrollable").css("height",edcal.getCalHeight()+"px");edcal.windowHeight=jQuery(window).height();
7
+ edcal.createDaysHeader();jQuery("#edcal_scrollable").scrollable({vertical:!0,size:edcal.weeksPref,keyboard:!1,keyboardSteps:1,speed:100,easing:"linear"});var a=jQuery("#edcal_scrollable").scrollable();a.getConf().keyboard=!1;var b=jQuery.cookie("edcal_date");b?(b=Date.parseExact(b,"yyyy-dd-MM"),edcal.output("Resetting to date from the edcal_Date cookie: "+b)):b=Date.today();edcal.moveTo(b.clone());a.onBeforeSeek(function(a,b){return!1});edcal.enableMouseWheel();jQuery(document).bind("keydown",function(a){if(27===
8
+ a.keyCode)return!1;if(!jQuery("#edcal_quickedit").is(":visible"))if(40!==a.keyCode||a.altKey||a.ctrlKey)if(38!==a.keyCode||a.altKey||a.ctrlKey){if(34===a.keyCode&&!a.altKey&&!a.ctrlKey||40===a.keyCode&&a.ctrlKey)return edcal.move(edcal.weeksPref,!0),!1;if(33===a.keyCode&&!a.altKey&&!a.ctrlKey||38===a.keyCode&&a.ctrlKey)return edcal.move(edcal.weeksPref,!1),!1}else return edcal.move(1,!1),!1;else return edcal.move(1,!0),!1});edcal.getPosts(edcal.nextStartOfWeek(b).add(-3).weeks(),edcal.nextStartOfWeek(b).add(edcal.weeksPref+
9
+ 3).weeks());jQuery("#moveToToday").click(function(){edcal.moveTo(Date.today());edcal.getPosts(edcal.nextStartOfWeek(Date.today()).add(-3).weeks(),edcal.nextStartOfWeek(Date.today()).add(edcal.weeksPref+3).weeks());return!1});jQuery("#moveToLast").click(function(){if("-1"!==edcal.lastPostDate){var a=Date.parseExact(edcal.lastPostDate,"ddMMyyyy");edcal.moveTo(a);edcal.getPosts(edcal.nextStartOfWeek(a).add(-3).weeks(),edcal.nextStartOfWeek(a).add(edcal.weeksPref+3).weeks());return!1}});jQuery("#prevmonth").click(function(){edcal.move(edcal.weeksPref,
10
+ !1);return!1});jQuery("#nextmonth").click(function(){edcal.move(edcal.weeksPref,!0);return!1});jQuery("#newPostScheduleButton").on("click",function(a){if(jQuery(this).hasClass("disabled"))return!1;jQuery(this).addClass("disabled");return edcal.savePost(null,!1,!0)});jQuery("#edcal-title-new-field").bind("keyup",function(a){0<jQuery("#edcal-title-new-field").val().length&&(!jQuery("#edcal-time").is(":visible")||0<jQuery("#edcal-time").val().length)?jQuery("#newPostScheduleButton").removeClass("disabled"):
11
+ jQuery("#newPostScheduleButton").addClass("disabled");if(13===a.keyCode)return edcal.savePost(null,!0)});jQuery("#edcal-status").bind("change",function(a){edcal.updatePublishButton()});jQuery("#edcal_weeks_pref").on("keyup",function(a){0<jQuery("#edcal_weeks_pref").val().length?jQuery("#edcal_applyoptions").removeClass("disabled"):jQuery("#edcal_applyoptions").addClass("disabled");13===a.keyCode&&edcal.saveOptions()});edcal.savePosition();edcal.addOptionsSection();jQuery("#edcal-time").timePicker({show24Hours:"H:i"===
12
+ edcal.timeFormat,separator:":",step:30});jQuery("#showdraftsdrawer").click(function(){edcal.setDraftsDrawerVisible(!edcal.isDraftsDrawerVisible)})}},setDraftsDrawerVisible:function(a,b){var c=jQuery("#showdraftsdrawer");c.hasClass("isLoaded")?b&&b():(c.addClass("isLoaded"),edcal.setupDraftsdrawer(b));a?(jQuery("#cal_cont").css({"margin-right":"13.5%"}),jQuery("#draftsdrawer_cont").css({display:"block",width:"13%"}),c.html(edcal.str_hidedrafts)):(jQuery("#cal_cont").css({"margin-right":"0"}),jQuery("#draftsdrawer_cont").css({display:"none",
13
+ width:"0"}),c.html(edcal.str_showdrafts));edcal.isDraftsDrawerVisible=a;jQuery.cookie("edcal_drafts_drawer",a,{expires:2060})},setupDraftsdrawer:function(a){jQuery("#draftsdrawer_loading").css({display:"block"});edcal.getPosts(edcal.NO_DATE,null,function(){edcal.initDraftsdrawer();a&&a()})},initDraftsdrawer:function(){var a=""+('<a href="#" adddate="'+edcal.NO_DATE+'" class="daynewlink" style="margin-top: 5px;"title="'+edcal.str_newdraft+'" id="unscheduledNewLink" onclick="edcal.addDraft(); return false;">'+
14
+ edcal.str_addDraftLink+"</a>");a=a+'<ul class="postlist">'+edcal.getPostItems(edcal.NO_DATE);a+="</ul>";edcal.draggablePost("#row"+edcal._wDate.toString(edcal.internalDateFormat)+" li.post");edcal.makeDroppable(jQuery("#draftsdrawer div.day"));jQuery("#unscheduled").append(a);jQuery("#draftsdrawer_loading").css({display:"none"});a=jQuery("#cal_cont");jQuery("#unscheduled ul.postlist").css("min-height",a.height()-10-jQuery("#draftsdrawer .draftsdrawerheadcont").height()-jQuery("#unscheduledNewLink").outerHeight());
15
+ jQuery("#unscheduled").mouseout(function(){jQuery("#unscheduledNewLink").hide()}).mouseover(function(){jQuery("#unscheduledNewLink").show()})},alignGrid:function(a,b,c,d,e){if("draftsdrawer"!==jQuery(a).parent().attr("id")){var f=0,h=0,g=1;jQuery(a).each(function(){jQuery(this).css("position","relative");var a=jQuery(this).children("div");if(1===b||"ltr"===edcal.ltr)for(var k=0;k<a.length;k++)a.eq(k).css({width:c+"%",height:d+"%",position:"absolute",left:f+"%",top:h+"%"}),0===g%b?(f=0,h+=d+e):f+=
16
+ c+e,g++;else for(k=a.length-1;-1<k;k--)a.eq(k).css({width:c+"%",height:d+"%",position:"absolute",left:f+"%",top:h+"%"}),0===g%b?(f=0,h+=d+e):f+=c+e,g++})}},alignCal:function(){edcal.alignGrid("#cal",1,100,100/edcal.weeksPref-1,1)},createDaysHeader:function(){var a=Date.today().next().sunday();edcal.nextStartOfWeek(a);var b='<div class="dayheadcont"><div class="dayhead firstday">'+a.add(edcal.startOfWeek).days().toString("dddd")+"</div>",b=b+('<div class="dayhead">'+a.add(1).days().toString("dddd")+
17
+ "</div>"),b=b+('<div class="dayhead">'+a.add(1).days().toString("dddd")+"</div>"),b=b+('<div class="dayhead">'+a.add(1).days().toString("dddd")+"</div>"),b=b+('<div class="dayhead">'+a.add(1).days().toString("dddd")+"</div>"),b=b+('<div class="dayhead">'+a.add(1).days().toString("dddd")+"</div>"),b=b+('<div class="dayhead lastday">'+a.add(1).days().toString("dddd")+"</div>");jQuery("#cal_cont").prepend(b);edcal.alignGrid(".dayheadcont",7,13.8,100,.5)},getDateClass:function(a){var b;var c=-1===a.compareTo(Date.today())?
18
+ "beforeToday":"todayAndAfter";edcal.firstDayOfMonth||(edcal.firstDayOfMonth=Date.today().moveToFirstDayOfMonth().clearTime(),edcal.firstDayOfNextMonth=Date.today().moveToLastDayOfMonth().clearTime());a.between(edcal.firstDayOfMonth,edcal.firstDayOfNextMonth)?b="month-present":1===a.compareTo(edcal.firstDayOfMonth)?b="month-future":-1===a.compareTo(edcal.firstDayOfNextMonth)&&(b="month-past");"01"===a.toString("dd")&&(c+=" firstOfMonth");return b+" "+c},showAddPostLink:function(a){edcal.inDrag||(a=
19
+ jQuery("#"+a+" a.daynewlink"),a.css("display","block"),a.bind("click",edcal.addPost))},hideAddPostLink:function(a){jQuery("#"+a+" a.daynewlink").hide().unbind("click",edcal.addPost)},createRow:function(a,b){for(var c=edcal._wDate.clone(),d='<div class="rowcont" id="row'+edcal._wDate.toString(edcal.internalDateFormat)+'"><div id="row'+edcal._wDate.toString(edcal.internalDateFormat)+'row" class="edcal_row">',e=0;7>e;e++)d+="<div onmouseover=\"edcal.showAddPostLink('"+c.toString(edcal.internalDateFormat)+
20
+ "');\" onmouseout=\"edcal.hideAddPostLink('"+c.toString(edcal.internalDateFormat)+'\');" id="'+c.toString(edcal.internalDateFormat)+'" class="day '+edcal.getDateClass(c)+" "+c.toString("dddd").toLowerCase()+" month-"+c.toString("MM").toLowerCase()+'">',d+='<div class="dayobj">',d+='<a href="#" adddate="'+c.toString("MMMM d")+'" class="daynewlink" title="'+sprintf(edcal.str_newpost,edcal.chineseAposWorkaround(c.toString(Date.CultureInfo.formatPatterns.monthDay)))+'" onclick="return false;">'+edcal.str_addPostLink+
21
+ "</a>",d="01"===c.toString("dd")?d+('<div class="daylabel">'+c.toString("MMM d")):d+('<div class="daylabel">'+c.toString("d")),d+="</div>",d+='<ul class="postlist">',d+=edcal.getPostItems(c.toString(edcal.internalDateFormat)),d+="</ul>",d+="</div>",d+="</div>",c.add(1).days();d+="</div></div>";b?a.append(d):a.prepend(d);edcal.alignGrid("#row"+edcal._wDate.toString(edcal.internalDateFormat)+"row",7,13.9,100,.5);edcal.draggablePost("#row"+edcal._wDate.toString(edcal.internalDateFormat)+" li.post");
22
+ edcal.makeDroppable(jQuery("#row"+edcal._wDate.toString(edcal.internalDateFormat)+" > div > div.day"));return jQuery("row"+edcal._wDate.toString(edcal.internalDateFormat))},makeDroppable:function(a){a.droppable({hoverClass:"day-active",accept:function(a){return jQuery(this).hasClass("beforeToday")?a.hasClass("draft")?!0:!1:!0},greedy:!0,tolerance:"pointer",drop:function(a,c){a=c.draggable.parent().parent().parent().attr("id");edcal.doDrop(a,c.draggable.attr("id"),jQuery(this).attr("id"))}})},doDrop:function(a,
23
+ b,c,d){var e=edcal.findPostForId(a,b);edcal.removePostFromMap(a,b);var f=jQuery("#"+b);f.detach();setTimeout(function(){f.remove()},500);jQuery("#"+c+" .postlist").append(edcal.createPostItem(e,c));a===c?edcal.draggablePost("#"+c+" .post"):edcal.changeDate(c,e,d)},draggablePost:function(a){jQuery(a).each(function(){var a=edcal.findPostForId(jQuery(this).parent().parent().parent().attr("id"),jQuery(this).attr("id"));edcal.isPostMovable(a)&&(jQuery(this).draggable({revert:"invalid",appendTo:"body",
24
+ helper:"clone",distance:1,addClasses:!1,start:function(){edcal.inDrag=!0},stop:function(){edcal.inDrag=!1},drag:function(a,b){edcal.handleDrag(a,b)},scroll:!1,refreshPositions:!0}),jQuery(this).addClass("draggable"))})},handleDrag:function(a,b){edcal.isMoving||edcal.isDragScrolling||(edcal.isDragScrolling=!0,a.pageY<edcal.position.top+10?edcal.move(1,!1):a.pageY>edcal.position.bottom-10&&edcal.move(1,!0),setTimeout(function(){edcal.isDragScrolling=!1},300))},removePostFromMap:function(a,b){if(edcal.posts[a])for(var c=
25
+ 0;c<edcal.posts[a].length;c++)if(edcal.posts[a][c]&&"post-"+edcal.posts[a][c].id===b)return edcal.posts[a][c]=null,!0;return!1},addPostItem:function(a,b){jQuery("#"+b+" > div > ul").append(edcal.createPostItem(a,b))},addPostItemDragAndToolltip:function(a){edcal.draggablePost("#"+a+" > div > ul > li")},deletePost:function(a,b){a=edcal.ajax_url()+"&action=edcal_deletepost&postid="+a;jQuery.ajax({url:a,type:"POST",processData:!1,timeout:1E5,dataType:"json",success:function(a){a.post.date_gmt===edcal.NO_DATE?
26
+ edcal.removePostItem(a.post.date_gmt,"post-"+a.post.id):edcal.removePostItem(a.post.date,"post-"+a.post.id);a.error?a.error===edcal.NONCE_ERROR&&edcal.showError(edcal.checksum_error):edcal.output('Finished deleting the post: "'+a.post.title+'" with id:'+a.post.id);b&&b(a)},error:function(a){edcal.showError(edcal.general_error);a.responseText&&edcal.output("deletePost xhr.responseText: "+a.responseText)}})},confirmDelete:function(a){return confirm(edcal.str_del_msg1+a+edcal.str_del_msg2)?!0:!1},ajax_url:function(){return ajaxurl+
27
+ "?_wpnonce="+edcal.wp_nonce},getMediaBar:function(){return jQuery("#cal_mediabar").html()},addPost:function(){jQuery("#newPostScheduleButton").addClass("disabled");var a=jQuery(this).parent().parent().attr("id"),b=edcal.defaultTime;"H:i"!==edcal.timeFormat&&"G:i"!==edcal.timeFormat&&(b+=" AM");a={id:0,date:a,formatteddate:edcal.getDayFromDayId(a).toString(edcal.previewDateFormat),time:b};edcal.showForm(a);return!1},addDraft:function(){jQuery("#newPostScheduleButton").addClass("disabled");var a={id:0,
28
+ date:Date.today(),formatteddate:edcal.NO_DATE,time:edcal.NO_DATE,status:"draft"};edcal.showForm(a);return!1},editPost:function(a){jQuery("#newPostScheduleButton").removeClass("disabled");edcal.getPost(a,edcal.showForm);return!1},savePost:function(a,b,c,d){if("undefined"===typeof a||null===a)a=edcal.serializePost();if(!a.title||""===a.title)return!1;jQuery("#edit-slug-buttons").addClass("tiploading");var e=a.time.toUpperCase();"12"===e.slice(0,2)&&"PM"===e.slice(e.length-2,e.length)?a.time="12:"+e.slice(3,
29
+ 5):"12"===e.slice(0,2)&&"AM"===e.slice(a.time.length-2,a.time.length)&&(a.time="00:"+e.slice(3,5));var e=""!==a.time?Date.parse(a.time):Date.parse(edcal.defaultTime);if(null!==e&&e!==edcal.NO_DATE){var f=e.format("H:i:s");var h=encodeURIComponent(edcal.getDayFromDayId(a.date).toString(edcal.wp_dateFormat)+" "+f)}else h=encodeURIComponent(a.date.toString(edcal.wp_dateFormat+" H:i:s"));f=edcal.ajax_url()+"&action=edcal_savepost";a="date="+h+"&title="+encodeURIComponent(a.title)+"&content="+encodeURIComponent(a.content)+
30
+ "&id="+encodeURIComponent(a.id)+"&status="+encodeURIComponent(a.status)+"&orig_status="+encodeURIComponent(a.orig_status);if(null===e||e===edcal.NO_DATE)a+="&date_gmt="+encodeURIComponent("0000-00-00 00:00:00");edcal.getUrlVars().post_type&&(a+="&post_type="+encodeURIComponent(edcal.getUrlVars().post_type));c&&(a+="&dopublish="+encodeURIComponent("future"));jQuery.ajax({url:f,type:"POST",processData:!1,data:a,timeout:1E5,dataType:"json",success:function(a){jQuery("#edit-slug-buttons").removeClass("tiploading");
31
+ jQuery("#edcal_quickedit").hide();jQuery("#edcal_scrollable").data("scrollable").getConf().keyboard=!0;if(a.error)return a.error===edcal.NONCE_ERROR&&edcal.showError(edcal.checksum_error),!1;if(a.post)if(b)window.location=a.post.editlink.replace("&amp;","&");else{var c=a.post.date;a.post.date_gmt===edcal.NO_DATE&&(c=a.post.date_gmt);a.post.id&&edcal.removePostItem(c,"post-"+a.post.id);edcal.addPostItem(a.post,c);edcal.addPostItemDragAndToolltip(c)}else edcal.showError("There was an error creating a new post for your blog.");
32
+ d&&d(a);return!0},error:function(a){jQuery("#edit-slug-buttons").removeClass("tiploading");jQuery("#edcal_quickedit").hide();jQuery("#edcal_scrollable").data("scrollable").getConf().keyboard=!0;edcal.showError(edcal.general_error);a.responseText&&edcal.output("savePost xhr.responseText: "+a.responseText)}});return!1},serializePost:function(){var a={};jQuery("#edcal_quickedit").find("input, textarea, select").each(function(){a[this.name]=this.value});return a},showForm:function(a){edcal.resetForm();
33
+ a.formatteddate===edcal.NO_DATE||a.date_gmt===edcal.NO_DATE?jQuery("#timeEditControls").hide():jQuery("#timeEditControls").show();jQuery("#edcal_quickedit").center().show();jQuery("#edcal_scrollable").data("scrollable").getConf().keyboard=!1;a.id?(jQuery("#tooltiptitle").text(sprintf(edcal.str_edit_post_title,a.typeTitle,edcal.getDayFromDayId(a.date).toString(edcal.previewDateFormat))),jQuery("#edcal-title-new-field").val(a.title),jQuery("#content").val(a.content)):a.formatteddate===edcal.NO_DATE?
34
+ jQuery("#tooltiptitle").text(edcal.str_newdraft_title):jQuery("#tooltiptitle").text(edcal.str_newpost_title+a.formatteddate);"future"===a.status&&jQuery("#newPostScheduleButton").text(edcal.str_update);a.status?(jQuery("#edcal-status").val(a.status),edcal.updatePublishButton()):(0!==jQuery("#edcal-status option[value="+edcal.defaultStatus+"]").length?jQuery("#edcal-status").val(edcal.defaultStatus):jQuery("#edcal-status").val("draft"),jQuery("#newPostScheduleButton").text(edcal.str_save));a.status&&
35
+ "draft"!==a.status&&"future"!==a.status&&"pending"!==a.status&&(jQuery("#edcal-status").attr("disabled","true"),jQuery("#edcal-status").append('<option class="temp" value="'+a.status+'">'+a.status+"</option>"),jQuery("#edcal-status").val(a.status));a.formatteddate!==edcal.NO_DATE&&-1===edcal.getDayFromDayId(a.date).compareTo(Date.today())&&jQuery("#edcal-status").attr("disabled","true");var b=a.time;jQuery("#edcal-time").val(b);jQuery("#edcal-date").val(a.date);jQuery("#edcal-id").val(a.id);jQuery("#edcal-title-new-field").focus();
36
+ jQuery("#edcal-title-new-field").select()},hideForm:function(){jQuery("#edcal_quickedit").hide();jQuery("#edcal_scrollable").data("scrollable").getConf().keyboard=!0;edcal.resetForm()},resetForm:function(){jQuery("#edcal_quickedit").find("input, textarea, select").each(function(){this.value=""});jQuery("#edcal-status").removeAttr("disabled");jQuery("#newPostScheduleButton").text(edcal.str_publish);jQuery("#tooltiptitle").text("");jQuery("#edcal-status").removeAttr("disabled");jQuery("#edcal-status .temp").remove()},
37
+ createPostItem:function(a,b){edcal.posts[b]||(edcal.posts[b]=[]);edcal.posts[b][edcal.posts[b].length]=a;return edcal.getPostItemString(a)},findPostForId:function(a,b){if(edcal.posts[a])for(var c=0;c<edcal.posts[a].length;c++)if(edcal.posts[a][c]&&"post-"+edcal.posts[a][c].id===b)return edcal.posts[a][c];return null},removePostItem:function(a,b){if(edcal.findPostForId(a,b))for(var c=0;c<edcal.posts[a].length;c++)edcal.posts[a][c]&&"post-"+edcal.posts[a][c].id===b&&(edcal.posts[a][c]=null);jQuery("#"+
38
+ b).remove()},getPostItems:function(a){var b="";if(edcal.posts[a]){var c=edcal.posts[a];if(50>c.length)for(a=0;a<c.length;a++)c[a]&&(b+=edcal.getPostItemString(c[a]));else edcal.addPostItems(a,0,50)}return b},addPostItems:function(a,b,c){var d=edcal.posts[a],e="";setTimeout(function(){for(var f=b;f<b+c&&f<d.length;f++)d[f]&&(e+=edcal.getPostItemString(d[f]));jQuery("#"+a+" ul").append(e);b+c<d.length&&edcal.addPostItems(a,b+c,50)},100)},showActionLinks:function(a){edcal.actionTimer&&clearTimeout(edcal.actionTimer);
39
+ var b=edcal.findPostForId(jQuery("#"+a).parent().parent().parent().attr("id"),a);if(!edcal.inDrag&&edcal.isPostEditable(b)){var c=jQuery("#"+a+" > div.postactions");edcal.actionLinksElem&&edcal.actionLinksElem.get(0)!==c.get(0)&&edcal.actionLinksElem.slideUp();edcal.actionLinksElem=c;edcal.actionTimer=setTimeout(function(){c.slideDown();if(c.parent().position().top+c.parent().height()>c.parent().parent().height()){var b=jQuery("#"+a+" > div.postactions").parent().parent();b.scrollTop(b.scrollTop()+
40
+ 45)}},250)}},hideActionLinks:function(a){edcal.actionTimer&&clearTimeout(edcal.actionTimer);edcal.actionTimer=setTimeout(function(){jQuery("#"+a+" > div.postactions").slideUp();edcal.actionLinksElem=null},1E3)},isPostMovable:function(a){return a.editlink&&"publish"!==a.status},isPostEditable:function(a){return a.editlink},getPostEditableClass:function(a){return a.editlink?"":"readonly"},getPostItemString:function(a){var b=a.title;""===b&&(b="[No Title]");edcal.statusPref&&("draft"===a.status&&"1"===
41
+ a.sticky?b+=edcal.str_draft_sticky:"pending"===a.status&&"1"===a.sticky?b+=edcal.str_pending_sticky:"1"===a.sticky?b+=edcal.str_sticky:"pending"===a.status?b+=edcal.str_pending:"draft"===a.status?b+=edcal.str_draft:"publish"!==a.status&&"future"!==a.status&&"pending"!==a.status&&(b+=" ["+a.status+"]"));edcal.timePref&&(b='<span class="posttime">'+a.formattedtime+"</span> "+b);edcal.authorPref&&(b=sprintf(edcal.str_by,b,'<span class="postauthor">'+a.author+"</span>"));return edcal.isPostMovable(a)?
42
+ "<li onmouseover=\"edcal.showActionLinks('post-"+a.id+"');\" onmouseout=\"edcal.hideActionLinks('post-"+a.id+'\');" id="post-'+a.id+'" class="post '+a.status+" "+edcal.getPostEditableClass(a)+a.slugs+'"><div class="postlink "><span>'+b+'</span></div><div class="postactions"><a href="'+a.editlink+'">'+edcal.str_edit+'</a> | <a href="#" onclick="edcal.editPost('+a.id+'); return false;">'+edcal.str_quick_edit+'</a> | <a href="'+a.dellink+'" onclick="return edcal.confirmDelete(\''+a.title+"');\">"+edcal.str_del+
43
+ '</a> | <a href="'+a.permalink+'">'+edcal.str_view+"</a></div></li>":"<li onmouseover=\"edcal.showActionLinks('post-"+a.id+"');\" onmouseout=\"edcal.hideActionLinks('post-"+a.id+'\');" id="post-'+a.id+'" class="post '+a.status+" "+edcal.getPostEditableClass(a)+'"><div class="postlink "><span>'+b+'</span></div><div class="postactions"><a href="'+a.editlink+'">'+edcal.str_republish+'</a> | <a href="'+a.permalink+'">'+edcal.str_view+"</a></div></li>"},setClassforToday:function(){jQuery("#"+Date.today().toString(edcal.internalDateFormat)).addClass("today")},
44
+ getCalHeight:function(){var a=jQuery(window).height()-jQuery("#footer").height()-jQuery("#wphead").height()-150;return Math.max(a,500)},move:function(a,b,c){if(!jQuery("#edcal_quickedit").is(":visible")){edcal.currentDirection!==b&&(edcal._wDate=b?edcal._wDate.add(7*(edcal.weeksPref+7)).days():edcal._wDate.add(-(7*(edcal.weeksPref+7))).days(),edcal.steps=0,edcal.moveDate=edcal._wDate);edcal.currentDirection=b;var d;if(b)for(d=0;d<a;d++)jQuery("#cal > div:first").remove(),edcal.createRow(jQuery("#cal"),
45
+ !0),edcal._wDate.add(7).days();else for(d=0;d<a;d++)jQuery("#cal > div:last").remove(),edcal.createRow(jQuery("#cal"),!1),edcal._wDate.add(-7).days();edcal.alignCal();edcal.setClassforToday();edcal.setDateLabel();edcal.steps+=a;edcal.tID?clearTimeout(edcal.tID):edcal.moveDate=edcal._wDate;edcal.tID=setTimeout(function(){b?edcal.getPosts(edcal._wDate.clone().add(-7*(edcal.steps+1)).days(),edcal._wDate.clone(),c):edcal.getPosts(edcal._wDate.clone(),edcal._wDate.clone().add(7*(edcal.steps+1)).days(),
46
+ c);edcal.steps=0;edcal.tID=null;edcal.moveDate=edcal._wDate},1E3);b?jQuery.cookie("edcal_date",edcal._wDate.clone().add(-(edcal.weeksPref+4)).weeks().toString("yyyy-dd-MM")):jQuery.cookie("edcal_date",edcal._wDate.clone().add(3).weeks().toString("yyyy-dd-MM"))}},getDayFromDayId:function(a){return Date.parseExact(a.substring(2,4)+"/"+a.substring(0,2)+"/"+a.substring(4),"MM/dd/yyyy")},setDateLabel:function(a){var b=jQuery("#edcal_scrollable").scrollable().getVisibleItems();a=edcal.getDayFromDayId(b.eq(0).children(".edcal_row").children(".day:first").attr("id"));
47
+ b=edcal.getDayFromDayId(b.eq(edcal.weeksPref-1).children(".edcal_row").children(".day:last").attr("id"));jQuery("#currentRange").text(edcal.chineseAposWorkaround(a.toString(Date.CultureInfo.formatPatterns.yearMonth))+" - "+edcal.chineseAposWorkaround(b.toString(Date.CultureInfo.formatPatterns.yearMonth)))},nextStartOfWeek:function(a){a=a.clone();if(null===edcal.startOfWeek)if(edcal.locale){var b=edcal.locale.toUpperCase();edcal.endsWith(b,"AS")||edcal.endsWith(b,"AZ")||edcal.endsWith(b,"BW")||edcal.endsWith(b,
48
+ "CA")||edcal.endsWith(b,"CN")||edcal.endsWith(b,"FO")||edcal.endsWith(b,"GB")||edcal.endsWith(b,"GE")||edcal.endsWith(b,"GL")||edcal.endsWith(b,"GU")||edcal.endsWith(b,"HK")||edcal.endsWith(b,"IE")||edcal.endsWith(b,"IL")||edcal.endsWith(b,"IN")||edcal.endsWith(b,"IS")||edcal.endsWith(b,"JM")||edcal.endsWith(b,"JP")||edcal.endsWith(b,"KG")||edcal.endsWith(b,"KR")||edcal.endsWith(b,"LA")||edcal.endsWith(b,"MH")||edcal.endsWith(b,"MN")||edcal.endsWith(b,"MO")||edcal.endsWith(b,"MP")||edcal.endsWith(b,
49
+ "MT")||edcal.endsWith(b,"NZ")||edcal.endsWith(b,"PH")||edcal.endsWith(b,"PK")||edcal.endsWith(b,"SG")||edcal.endsWith(b,"SY")||edcal.endsWith(b,"TH")||edcal.endsWith(b,"TT")||edcal.endsWith(b,"TW")||edcal.endsWith(b,"UM")||edcal.endsWith(b,"US")||edcal.endsWith(b,"UZ")||edcal.endsWith(b,"VI")||edcal.endsWith(b,"ZW")?edcal.startOfWeek=0:edcal.endsWith(b,"MV")?edcal.startOfWeek=5:edcal.endsWith(b,"AF")||edcal.endsWith(b,"BH")||edcal.endsWith(b,"DJ")||edcal.endsWith(b,"DZ")||edcal.endsWith(b,"EG")||
50
+ edcal.endsWith(b,"ER")||edcal.endsWith(b,"ET")||edcal.endsWith(b,"IQ")||edcal.endsWith(b,"IR")||edcal.endsWith(b,"JO")||edcal.endsWith(b,"KE")||edcal.endsWith(b,"KW")||edcal.endsWith(b,"LY")||edcal.endsWith(b,"MA")||edcal.endsWith(b,"OM")||edcal.endsWith(b,"QA")||edcal.endsWith(b,"SA")||edcal.endsWith(b,"SD")||edcal.endsWith(b,"SO")||edcal.endsWith(b,"TN")||edcal.endsWith(b,"YE")?edcal.startOfWeek=6:edcal.startOfWeek=1}else edcal.startOfWeek=0;return a.next().sunday().add(edcal.startOfWeek).days()},
51
+ endsWith:function(a,b){return a.match(b+"$")===b},moveTo:function(a){edcal.isMoving=!0;jQuery("#cal").empty();jQuery.cookie("edcal_date",a.toString("yyyy-dd-MM"));edcal._wDate=edcal.nextStartOfWeek(a).add(-21).days();edcal.currentDirection=!0;a=edcal.weeksPref+6;for(var b=0;b<a;b++)edcal.createRow(jQuery("#cal"),!0),edcal._wDate.add(7).days();edcal.alignCal();jQuery("#edcal_scrollable").scrollable().move(2);edcal.setDateLabel();edcal.setClassforToday();edcal.isMoving=!1},savePosition:function(){var a=
52
+ jQuery("#edcal_scrollable"),b=jQuery("#cal_cont");edcal.position={top:a.offset().top,bottom:a.offset().top+a.height()};jQuery("#edcal_poststyle").remove();a=jQuery(".rowcont:eq(2) .dayobj:first").height()-jQuery(".rowcont:eq(2) .daylabel:first").height()-6;jQuery("head").append('<style id="edcal_poststyle" type="text/css">.ui-draggable-dragging {width: '+(jQuery(".rowcont:eq(2) .day:first").width()-5)+"px;}.postlist {height: "+a+"px;}</style>");jQuery("#draftsdrawer").css("height",b.height());jQuery("#draftsdrawer .day").css("min-height",
53
+ b.height()-10-jQuery("#draftsdrawer .draftsdrawerheadcont").height())},addFeedbackSection:function(){3<edcal.visitCount&&edcal.doFeedbackPref&&jQuery("#edcal_main_title").after(edcal.str_feedbackmsg)},doFeedback:function(){jQuery.getScript("http://www.zackgrossbart.com/edcal/mint/?js",function(){edcal.saveFeedbackPref()})},noFeedback:function(){jQuery("#feedbacksection").hide("fast");edcal.saveFeedbackPref()},saveFeedbackPref:function(){var a=edcal.ajax_url()+"&action=edcal_saveoptions&dofeedback="+
54
+ encodeURIComponent("done");jQuery.ajax({url:a,type:"POST",processData:!1,timeout:1E5,dataType:"text",success:function(a){jQuery("#feedbacksection").html(edcal.str_feedbackdone);setTimeout(function(){jQuery("#feedbacksection").hide("slow")},5E3)},error:function(a){edcal.showError(edcal.general_error);a.responseText&&edcal.output("saveOptions xhr.responseText: "+a.responseText)}})},updatePublishButton:function(){"future"===jQuery("#edcal-status").val()&&jQuery("#newPostScheduleButton").text(edcal.str_publish);
55
+ "pending"===jQuery("#edcal-status").val()?jQuery("#newPostScheduleButton").text(edcal.str_review):jQuery("#newPostScheduleButton").text(edcal.str_save)},changeDate:function(a,b,c){var d=a===edcal.NO_DATE,e=b.date_gmt===edcal.NO_DATE,f=d?"0000-00-00":edcal.getDayFromDayId(a).toString(edcal.wp_dateFormat),h=e?b.date_gmt:edcal.getDayFromDayId(b.date).toString(edcal.wp_dateFormat);d&&(b.status="draft");f=edcal.ajax_url()+"&action=edcal_changedate&postid="+b.id+"&postStatus="+b.status+"&newdate="+f+"&olddate="+
56
+ h;jQuery("#post-"+b.id).addClass("loadingclass");jQuery.ajax({url:f,type:"POST",processData:!1,timeout:1E5,dataType:"json",success:function(b){b.error&&(edcal.removePostItem(a,"post-"+b.post.id),b.error===edcal.CONCURRENCY_ERROR?edcal.displayMessage(edcal.concurrency_error+"<br />"+b.post.title):b.error===edcal.PERMISSION_ERROR?edcal.displayMessage(edcal.permission_error):b.error===edcal.NONCE_ERROR&&edcal.displayMessage(edcal.checksum_error));var f=d?"00000000":b.post.date,g=e?a:f;edcal.removePostItem(f,
57
+ "post-"+b.post.id);edcal.addPostItem(b.post,g);edcal.addPostItemDragAndToolltip(g);c&&c(b)},error:function(a,b,c){edcal.showError(edcal.general_error);edcal.output("textStatus: "+b);edcal.output("error: "+c);a.responseText&&edcal.output("changeDate xhr.responseText: "+a.responseText)}})},getPosts:function(a,b,c){b||(b="");edcal.cacheDates[a]?c&&c():(edcal.cacheDates[a]=!0,b=edcal.ajax_url()+"&action=edcal_posts&from="+a.toString("yyyy-MM-dd")+"&to="+b.toString("yyyy-MM-dd"),edcal.getUrlVars().post_type&&
58
+ (b+="&post_type="+encodeURIComponent(edcal.getUrlVars().post_type)),jQuery("#loading").show(),jQuery.ajax({url:b,type:"GET",processData:!1,timeout:1E5,dataType:"text",success:function(b){jQuery("#loading").hide();var d=null;try{d=JSON.parseIt(b)}catch(l){edcal.showFatalError(edcal.str_fatal_parse_error+l.message);window.console&&console.error(l);return}if(d.error)d.error===edcal.NONCE_ERROR&&edcal.showError(edcal.checksum_error);else{for(var f=[],h=d.length;0<=h;h--){var g=d[h];g&&"trash"!==g.status&&
59
+ (g.date=g.date.replace(g.date.substring(2,3),g.date.substring(2,3).toUpperCase()),"00000000"===a&&(g.date=a),edcal.removePostItem(g.date,"post-"+g.id),edcal.addPostItem(g,g.date),f[f.length]=g.date)}setTimeout(function(){jQuery.each(f,function(a,b){edcal.addPostItemDragAndToolltip(b)})},300);c&&c(b)}},error:function(a){edcal.showError(edcal.general_error);a.responseText&&edcal.output("getPosts xhr.responseText: "+a.responseText)}}))},getPost:function(a,b){if(0===a)return!1;jQuery("#loading").show();
60
+ a=edcal.ajax_url()+"&action=edcal_getpost&postid="+a;edcal.getUrlVars().post_type&&(a+="&post_type="+encodeURIComponent(edcal.getUrlVars().post_type));jQuery.ajax({url:a,type:"GET",processData:!1,timeout:1E5,dataType:"json",success:function(a){jQuery("#loading").hide();edcal.output("xhr for getPost returned: "+a);if(a.error)return a.error===edcal.NONCE_ERROR&&edcal.showError(edcal.checksum_error),!1;"function"===typeof b&&b(a.post);return a.post},error:function(a){jQuery("#loading").hide();edcal.showError(edcal.general_error);
61
+ a.responseText&&edcal.output("getPost xhr.responseText: "+a.responseText);return!1}});return!0},addOptionsSection:function(){var a='<div class="hide-if-no-js screen-meta-toggle" id="screen-options-link-wrap"><a class="show-settings" id="show-edcal-settings-link" onclick="edcal.toggleOptions(); return false;" href="#" >'+edcal.str_screenoptions+"</a></div>";0===jQuery("#screen-meta-links").length&&jQuery("#screen-meta").after('<div id="screen-meta-links"></div>');jQuery("#screen-meta-links").append(a)},
62
+ toggleOptions:function(){if(edcal.helpMeta)jQuery("#contextual-help-wrap").slideUp("fast"),jQuery("#contextual-help-wrap").html(edcal.helpMeta),edcal.helpMeta=null,jQuery("#show-edcal-settings-link").removeClass("screen-meta-active"),jQuery("#contextual-help-link-wrap").css("visibility","");else{edcal.helpMeta=jQuery("#contextual-help-wrap").html();for(var a='<div class="metabox-prefs calendar-fields-prefs"><h5>'+edcal.str_show_opts+'</h5><label for="author-hide"><input type="checkbox" '+edcal.isPrefChecked(edcal.authorPref)+
63
+ 'value="true" id="author-hide" name="author-hide" class="hide-column-tog" />'+edcal.str_opt_author+'</label><label for="status-hide"><input type="checkbox" '+edcal.isPrefChecked(edcal.statusPref)+'value="true" id="status-hide" name="status-hide" class="hide-column-tog" />'+edcal.str_opt_status+'</label><label for="time-hide"><input type="checkbox" '+edcal.isPrefChecked(edcal.timePref)+'value="true" id="time-hide" name="time-hide" class="hide-column-tog" />'+edcal.str_opt_time+'</label></div><div class="metabox-prefs calendar-fields-prefs"><h5>'+
64
+ edcal.str_show_wheel_opts+'</h5><label for="wheel-support"><input type="checkbox" '+edcal.isPrefChecked(edcal.wheelScrollPref)+'value="true" id="wheel-support" name="wheel-support" class="hide-column-tog" />'+edcal.str_opt_wheel+"</label></div>",a=a+('<div class="metabox-prefs"><h5>'+edcal.str_show_title+'</h5><select id="edcal_weeks_pref" class="screen-per-page" title="'+edcal.str_weekstt+'"> '),b=parseInt(edcal.weeksPref,10),c=1;9>c;c++)a=c===b?a+('<option selected="true">'+c+"</option>"):a+("<option>"+
65
+ c+"</option>");a+="</select>"+edcal.str_opt_weeks+"</div>";a+='<br /><button id="edcal_applyoptions" onclick="edcal.saveOptions(); return false;" class="save button">'+edcal.str_apply+"</button>";jQuery("#contextual-help-wrap").html(a);jQuery("#contextual-help-link-wrap").css("visibility","hidden");jQuery("#contextual-help-wrap").slideDown("normal");jQuery("#screen-meta").show();jQuery("#show-edcal-settings-link").addClass("screen-meta-active")}},generateColorPicker:function(a,b,c){a='<div id="'+
66
+ b+'" class="optionscolorrow">'+('<span style="background-color: '+c+';" class="colorlabel"> '+a+"</span> ");var d="lightred orange yellow lightgreen lightblue purple lightgray".split(" ");edcal.output("colors.length: "+d.length);for(var e=0;e<d.length;e++)a+='<a href="#" class="optionscolor ',d[e]===c&&(a+="colorselected"),a+='" class='+b+d[e]+'" style="background-color: '+d[e]+"; left: "+(20*e+50)+'px" onclick="edcal.selectColor(\''+b+"', '"+d[e]+"'); return false;\"></a>";return a+"</div>"},selectColor:function(a,
67
+ b){edcal.output("selectColor("+a+", "+b+")");jQuery("#"+a+" .colorlabel").css("background-color",b);jQuery("#"+a+" .colorselected").removeClass("colorselected");jQuery("#"+a+"value").addClass("colorselected")},isPrefChecked:function(a){return a?' checked="checked" ':""},saveOptions:function(){var a=parseInt(jQuery("#edcal_weeks_pref").val(),10);if(1>a||8<a)humanMsg.displayMsg(edcal.str_weekserror);else{edcal.enableMouseWheel();var b=edcal.ajax_url()+"&action=edcal_saveoptions&weeks="+encodeURIComponent(jQuery("#edcal_weeks_pref").val());
68
+ jQuery("div.calendar-fields-prefs").find("input, textarea, select").each(function(){b+="&"+encodeURIComponent(this.name)+"="+encodeURIComponent(this.checked)});jQuery.ajax({url:b,type:"POST",processData:!1,timeout:1E5,dataType:"text",success:function(a){window.location.href=window.location.href},error:function(a){edcal.showError(edcal.general_error);a.responseText&&edcal.output("saveOptions xhr.responseText: "+a.responseText)}})}},output:function(a){window.console&&console.log(a)},showError:function(a){window.console&&
69
+ console.error(a);edcal.displayMessage(a)},displayMessage:function(a){humanMsg.displayMsg(a)},getUrlVars:function(){for(var a=[],b,c=window.location.href.slice(window.location.href.indexOf("?")+1).split("&"),d=0;d<c.length;d++)b=c[d].split("="),a.push(b[0]),a[b[0]]=b[1];return a},showFatalError:function(a){jQuery("#edcal_main_title").after('<div class="error below-h2" id="message"><p>'+edcal.str_fatal_error+a+"<br></p></div>");window.console&&console.error(a)},chineseAposWorkaround:function(a){return 0===
70
+ Date.CultureInfo.name.indexOf("zh")||0===Date.CultureInfo.name.indexOf("ja")?a.replace(/'/g,""):a}};jQuery.fn.center=function(){this.css("position","absolute");this.css("top",(jQuery(window).height()-this.outerHeight())/2+jQuery(window).scrollTop()+"px");this.css("left",(jQuery(window).width()-this.outerWidth())/2+jQuery(window).scrollLeft()+"px");return this};
71
+ jQuery(document).ready(function(){try{edcal.init()}catch(a){edcal.output("Error loading calendar: "+a),edcal.showFatalError(a.description)}edcal.getUrlVars().qunit&&edcal_test.runTests()});
edcal.php CHANGED
@@ -18,7 +18,7 @@
18
  /*
19
  Plugin Name: WordPress Editorial Calendar
20
  Description: The Editorial Calendar makes it possible to see all your posts and drag and drop them to manage your blog.
21
- Version: 3.7
22
  Author: Colin Vernon, Justin Evans, Joachim Kudish, Mary Vogt, and Zack Grossbart
23
  Author URI: http://www.zackgrossbart.com
24
  Plugin URI: http://stresslimitdesign.com/editorial-calendar-plugin
@@ -231,6 +231,14 @@ class EdCal {
231
  <?php
232
  }
233
  ?>
 
 
 
 
 
 
 
 
234
 
235
  <?php
236
  if (get_option("edcal_status_pref") != "") {
@@ -320,9 +328,11 @@ class EdCal {
320
  edcal.str_show_title = <?php echo($this->edcal_json_encode(__('Show on screen', 'editorial-calendar'))) ?>;
321
  edcal.str_opt_weeks = <?php echo($this->edcal_json_encode(__(' weeks at a time', 'editorial-calendar'))) ?>;
322
  edcal.str_show_opts = <?php echo($this->edcal_json_encode(__('Show in Calendar Cell', 'editorial-calendar'))) ?>;
 
323
  edcal.str_opt_author = <?php echo($this->edcal_json_encode(__('Author', 'editorial-calendar'))) ?>;
324
  edcal.str_opt_status = <?php echo($this->edcal_json_encode(__('Status', 'editorial-calendar'))) ?>;
325
  edcal.str_opt_time = <?php echo($this->edcal_json_encode(__('Time of day', 'editorial-calendar'))) ?>;
 
326
  edcal.str_fatal_error = <?php echo($this->edcal_json_encode(__('An error occurred while loading the calendar: ', 'editorial-calendar'))) ?>;
327
  edcal.str_fatal_parse_error = <?php echo($this->edcal_json_encode(__('<br /><br />The calendar was not able to parse the data your blog returned about the posts. This error is most likely caused by a conflict with another plugin on your blog. The actual parse error was:<br/><br/> ', 'editorial-calendar'))) ?>;
328
 
@@ -1366,6 +1376,15 @@ class EdCal {
1366
  add_option("edcal_time_pref", $edcal_time, "", "yes");
1367
  update_option("edcal_time_pref", $edcal_time);
1368
  }
 
 
 
 
 
 
 
 
 
1369
 
1370
  /*
1371
  * The edcal feedback preference
18
  /*
19
  Plugin Name: WordPress Editorial Calendar
20
  Description: The Editorial Calendar makes it possible to see all your posts and drag and drop them to manage your blog.
21
+ Version: 3.7.1
22
  Author: Colin Vernon, Justin Evans, Joachim Kudish, Mary Vogt, and Zack Grossbart
23
  Author URI: http://www.zackgrossbart.com
24
  Plugin URI: http://stresslimitdesign.com/editorial-calendar-plugin
231
  <?php
232
  }
233
  ?>
234
+
235
+ <?php
236
+ if (get_option("edcal_wheelscroll_pref") != "") {
237
+ ?>
238
+ edcal.wheelScrollPref = <?php echo(get_option("edcal_wheelscroll_pref")); ?>;
239
+ <?php
240
+ }
241
+ ?>
242
 
243
  <?php
244
  if (get_option("edcal_status_pref") != "") {
328
  edcal.str_show_title = <?php echo($this->edcal_json_encode(__('Show on screen', 'editorial-calendar'))) ?>;
329
  edcal.str_opt_weeks = <?php echo($this->edcal_json_encode(__(' weeks at a time', 'editorial-calendar'))) ?>;
330
  edcal.str_show_opts = <?php echo($this->edcal_json_encode(__('Show in Calendar Cell', 'editorial-calendar'))) ?>;
331
+ edcal.str_show_wheel_opts = <?php echo($this->edcal_json_encode(__('Mouse Wheel', 'editorial-calendar'))) ?>;
332
  edcal.str_opt_author = <?php echo($this->edcal_json_encode(__('Author', 'editorial-calendar'))) ?>;
333
  edcal.str_opt_status = <?php echo($this->edcal_json_encode(__('Status', 'editorial-calendar'))) ?>;
334
  edcal.str_opt_time = <?php echo($this->edcal_json_encode(__('Time of day', 'editorial-calendar'))) ?>;
335
+ edcal.str_opt_wheel = <?php echo($this->edcal_json_encode(__('Scroll the calendar with the mouse wheel', 'editorial-calendar'))) ?>;
336
  edcal.str_fatal_error = <?php echo($this->edcal_json_encode(__('An error occurred while loading the calendar: ', 'editorial-calendar'))) ?>;
337
  edcal.str_fatal_parse_error = <?php echo($this->edcal_json_encode(__('<br /><br />The calendar was not able to parse the data your blog returned about the posts. This error is most likely caused by a conflict with another plugin on your blog. The actual parse error was:<br/><br/> ', 'editorial-calendar'))) ?>;
338
 
1376
  add_option("edcal_time_pref", $edcal_time, "", "yes");
1377
  update_option("edcal_time_pref", $edcal_time);
1378
  }
1379
+
1380
+ /*
1381
+ * The show mouse wheel preference
1382
+ */
1383
+ $edcal_wheel = isset($_GET['wheel-support'])?$_GET['wheel-support']:null;
1384
+ if ($edcal_wheel != null) {
1385
+ add_option("edcal_wheelscroll_pref", $edcal_time, "", "yes");
1386
+ update_option("edcal_wheelscroll_pref", $edcal_wheel);
1387
+ }
1388
 
1389
  /*
1390
  * The edcal feedback preference
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: cvernon, justinstresslimit, jkudish, MaryVogt, zgrossbart
3
  Tags: posts, post, calendar, AJAX, admin, administration
4
  Requires at least: 4.0
5
  Tested up to: 4.9.8
6
- Stable tag: 3.7
7
 
8
  The Editorial Calendar makes it possible to see all your posts and drag and drop them to manage your blog.
9
 
@@ -195,6 +195,10 @@ The `edcal_default_status` property controls the default status for new posts in
195
 
196
  == Changelog ==
197
 
 
 
 
 
198
  = 3.7 =
199
 
200
  The calendar no longer responds to the mouse wheel. We did some user testing and it was a better experience without having to worry about the mouse wheel.
3
  Tags: posts, post, calendar, AJAX, admin, administration
4
  Requires at least: 4.0
5
  Tested up to: 4.9.8
6
+ Stable tag: 3.7.1
7
 
8
  The Editorial Calendar makes it possible to see all your posts and drag and drop them to manage your blog.
9
 
195
 
196
  == Changelog ==
197
 
198
+ = 3.7.1 =
199
+
200
+ We now have an option so you can choose if you want to scroll the calendar with the mouse wheel or not.
201
+
202
  = 3.7 =
203
 
204
  The calendar no longer responds to the mouse wheel. We did some user testing and it was a better experience without having to worry about the mouse wheel.