Editorial Calendar - Version 1.1

Version Description

  • There was a security hole in the calendar that allowed contributors to publish posts when they couldn't in the standard edit screen. We now only allow contributors to save drafts and schedule a post for review.
  • Changed the easing we are using for the animation of the calendar so we can work with the BuddyPress plugin.
  • Changed the text of the edit link on published posts from Republish to Edit.
Download this release

Release Info

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

Code changes from version 1.0 to 1.1

Files changed (4) hide show
  1. edcal.js +32 -18
  2. edcal.php +7 -4
  3. readme.txt +18 -1
  4. vid.png +0 -0
edcal.js CHANGED
@@ -873,11 +873,7 @@ var edcal = {
873
 
874
  if (post.status) {
875
  jQuery('#edcal-status').val(post.status);
876
- if (post.status === 'future') {
877
- jQuery('#newPostScheduleButton').text(edcal.str_publish);
878
- } else {
879
- jQuery('#newPostScheduleButton').text(edcal.str_save);
880
- }
881
  } else {
882
  jQuery('#edcal-status').val('draft');
883
  jQuery('#newPostScheduleButton').text(edcal.str_save);
@@ -1440,8 +1436,7 @@ var edcal = {
1440
  jQuery("#cal").empty();
1441
 
1442
  jQuery.cookie('edcal_date', date.toString('yyyy-dd-MM'));
1443
-
1444
-
1445
  /*
1446
  When we first start up our working date is 4 weeks before
1447
  the next Sunday.
@@ -1461,12 +1456,13 @@ var edcal = {
1461
  edcal.createRow(jQuery("#cal"), true);
1462
  edcal._wDate.add(7).days();
1463
  }
1464
-
1465
  edcal.alignCal();
1466
 
1467
  var api = jQuery("#edcal_scrollable").scrollable();
1468
- api.move(2);
1469
 
 
 
1470
  edcal.setDateLabel();
1471
  edcal.setClassforToday();
1472
  edcal.isMoving = false;
@@ -1586,12 +1582,20 @@ var edcal = {
1586
  */
1587
  edcal.createDaysHeader();
1588
 
1589
- // initialize scrollable
 
 
 
 
 
 
 
1590
  jQuery("#edcal_scrollable").scrollable({
1591
  vertical:true,
1592
  size: edcal.weeksPref,
1593
  keyboardSteps: 1,
1594
- speed: 100
 
1595
  // use mousewheel plugin
1596
  }).mousewheel();
1597
 
@@ -1613,7 +1617,7 @@ var edcal = {
1613
  }
1614
 
1615
  edcal.moveTo(curDate.clone());
1616
-
1617
  /*
1618
  * The scrollable handles some basic binding. This gets us
1619
  * up arrow, down arrow and the mouse wheel.
@@ -1637,7 +1641,7 @@ var edcal = {
1637
 
1638
  return false;
1639
  });
1640
-
1641
  /*
1642
  * We also want to listen for a few other key events
1643
  */
@@ -1719,11 +1723,7 @@ var edcal = {
1719
  });
1720
 
1721
  jQuery("#edcal-status").bind("change", function(evt) {
1722
- if (jQuery('#edcal-status').val() === 'future') {
1723
- jQuery('#newPostScheduleButton').text(edcal.str_publish);
1724
- } else {
1725
- jQuery('#newPostScheduleButton').text(edcal.str_save);
1726
- }
1727
  });
1728
 
1729
  jQuery("#edcal_weeks_pref").live("keyup", function(evt) {
@@ -1749,6 +1749,20 @@ var edcal = {
1749
  step: 30
1750
  });
1751
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1752
 
1753
  /*
1754
  This function makes an AJAX call and changes the date of
873
 
874
  if (post.status) {
875
  jQuery('#edcal-status').val(post.status);
876
+ edcal.updatePublishButton();
 
 
 
 
877
  } else {
878
  jQuery('#edcal-status').val('draft');
879
  jQuery('#newPostScheduleButton').text(edcal.str_save);
1436
  jQuery("#cal").empty();
1437
 
1438
  jQuery.cookie('edcal_date', date.toString('yyyy-dd-MM'));
1439
+
 
1440
  /*
1441
  When we first start up our working date is 4 weeks before
1442
  the next Sunday.
1456
  edcal.createRow(jQuery("#cal"), true);
1457
  edcal._wDate.add(7).days();
1458
  }
1459
+
1460
  edcal.alignCal();
1461
 
1462
  var api = jQuery("#edcal_scrollable").scrollable();
 
1463
 
1464
+ api.move(2);
1465
+
1466
  edcal.setDateLabel();
1467
  edcal.setClassforToday();
1468
  edcal.isMoving = false;
1582
  */
1583
  edcal.createDaysHeader();
1584
 
1585
+ /*
1586
+ * We start by initializting the scrollable. We use this to manage the
1587
+ * scrolling of the calendar, but don't actually call it to animate the
1588
+ * scrolling. We specify an easing here because the default is "swing"
1589
+ * and that has a conflict with JavaScript used in the BuddyPress plugin/
1590
+ *
1591
+ * This doesn't really change anything since the animation happens offscreen.
1592
+ */
1593
  jQuery("#edcal_scrollable").scrollable({
1594
  vertical:true,
1595
  size: edcal.weeksPref,
1596
  keyboardSteps: 1,
1597
+ speed: 100,
1598
+ easing: "linear"
1599
  // use mousewheel plugin
1600
  }).mousewheel();
1601
 
1617
  }
1618
 
1619
  edcal.moveTo(curDate.clone());
1620
+
1621
  /*
1622
  * The scrollable handles some basic binding. This gets us
1623
  * up arrow, down arrow and the mouse wheel.
1641
 
1642
  return false;
1643
  });
1644
+
1645
  /*
1646
  * We also want to listen for a few other key events
1647
  */
1723
  });
1724
 
1725
  jQuery("#edcal-status").bind("change", function(evt) {
1726
+ edcal.updatePublishButton();
 
 
 
 
1727
  });
1728
 
1729
  jQuery("#edcal_weeks_pref").live("keyup", function(evt) {
1749
  step: 30
1750
  });
1751
  },
1752
+
1753
+ /*
1754
+ This function updates the text of te publish button in the quick
1755
+ edit dialog to match the current operation.
1756
+ */
1757
+ updatePublishButton: function() {
1758
+ if (jQuery('#edcal-status').val() === 'future') {
1759
+ jQuery('#newPostScheduleButton').text(edcal.str_publish);
1760
+ } if (jQuery('#edcal-status').val() === 'pending') {
1761
+ jQuery('#newPostScheduleButton').text(edcal.str_review);
1762
+ } else {
1763
+ jQuery('#newPostScheduleButton').text(edcal.str_save);
1764
+ }
1765
+ },
1766
 
1767
  /*
1768
  This function makes an AJAX call and changes the date of
edcal.php CHANGED
@@ -18,10 +18,10 @@
18
  /*
19
  Plugin Name: WordPress Editorial Calendar
20
  Description: The Editorial Calendar makes it possible to see all your posts and drag and drop them to manage your blog.
21
- Version: 1.0
22
  Author: Colin Vernon, Justin Evans, Mary Vogt, and Zack Grossbart
23
  Author URI: http://www.zackgrossbart.com
24
- Plugin URI: http://www.zackgrossbart.com
25
  */
26
 
27
  add_action('wp_ajax_edcal_saveoptions', 'edcal_saveoptions' );
@@ -209,7 +209,7 @@ function edcal_list_admin() {
209
  edcal.str_quick_edit = <?php echo(edcal_json_encode(__('Quick Edit', 'editorial-calendar'))) ?>;
210
  edcal.str_del = <?php echo(edcal_json_encode(__('Delete', 'editorial-calendar'))) ?>;
211
  edcal.str_view = <?php echo(edcal_json_encode(__('View', 'editorial-calendar'))) ?>;
212
- edcal.str_republish = <?php echo(edcal_json_encode(__('Republish', 'editorial-calendar'))) ?>;
213
  edcal.str_status = <?php echo(edcal_json_encode(__('Status:', 'editorial-calendar'))) ?>;
214
  edcal.str_cancel = <?php echo(edcal_json_encode(__('Cancel', 'editorial-calendar'))) ?>;
215
  edcal.str_posttitle = <?php echo(edcal_json_encode(__('Title', 'editorial-calendar'))) ?>;
@@ -218,6 +218,7 @@ function edcal_list_admin() {
218
  edcal.str_newpost_title = <?php echo(edcal_json_encode(__('New Post - ', 'editorial-calendar'))) ?>;
219
  edcal.str_update = <?php echo(edcal_json_encode(__('Update', 'editorial-calendar'))) ?>;
220
  edcal.str_publish = <?php echo(edcal_json_encode(__('Schedule', 'editorial-calendar'))) ?>;
 
221
  edcal.str_save = <?php echo(edcal_json_encode(__('Save', 'editorial-calendar'))) ?>;
222
  edcal.str_edit_post_title = <?php echo(edcal_json_encode(__('Edit Post - ', 'editorial-calendar'))) ?>;
223
  edcal.str_scheduled = <?php echo(edcal_json_encode(__('Scheduled', 'editorial-calendar'))) ?>;
@@ -358,7 +359,9 @@ function edcal_list_admin() {
358
  <select name="status" id="edcal-status">
359
  <option value="draft"><?php _e('Draft', 'editorial-calendar') ?></option>
360
  <option value="pending"><?php _e('Pending Review', 'editorial-calendar') ?></option>
361
- <option id="futureoption" value="future"><?php _e('Scheduled', 'editorial-calendar') ?></option>
 
 
362
  </select>
363
  </span>
364
  </label>
18
  /*
19
  Plugin Name: WordPress Editorial Calendar
20
  Description: The Editorial Calendar makes it possible to see all your posts and drag and drop them to manage your blog.
21
+ Version: 1.1
22
  Author: Colin Vernon, Justin Evans, Mary Vogt, and Zack Grossbart
23
  Author URI: http://www.zackgrossbart.com
24
+ Plugin URI: http://stresslimitdesign.com/editorial-calendar-plugin
25
  */
26
 
27
  add_action('wp_ajax_edcal_saveoptions', 'edcal_saveoptions' );
209
  edcal.str_quick_edit = <?php echo(edcal_json_encode(__('Quick Edit', 'editorial-calendar'))) ?>;
210
  edcal.str_del = <?php echo(edcal_json_encode(__('Delete', 'editorial-calendar'))) ?>;
211
  edcal.str_view = <?php echo(edcal_json_encode(__('View', 'editorial-calendar'))) ?>;
212
+ edcal.str_republish = <?php echo(edcal_json_encode(__('Edit', 'editorial-calendar'))) ?>;
213
  edcal.str_status = <?php echo(edcal_json_encode(__('Status:', 'editorial-calendar'))) ?>;
214
  edcal.str_cancel = <?php echo(edcal_json_encode(__('Cancel', 'editorial-calendar'))) ?>;
215
  edcal.str_posttitle = <?php echo(edcal_json_encode(__('Title', 'editorial-calendar'))) ?>;
218
  edcal.str_newpost_title = <?php echo(edcal_json_encode(__('New Post - ', 'editorial-calendar'))) ?>;
219
  edcal.str_update = <?php echo(edcal_json_encode(__('Update', 'editorial-calendar'))) ?>;
220
  edcal.str_publish = <?php echo(edcal_json_encode(__('Schedule', 'editorial-calendar'))) ?>;
221
+ edcal.str_review = <?php echo(edcal_json_encode(__('Submit for Review', 'editorial-calendar'))) ?>;
222
  edcal.str_save = <?php echo(edcal_json_encode(__('Save', 'editorial-calendar'))) ?>;
223
  edcal.str_edit_post_title = <?php echo(edcal_json_encode(__('Edit Post - ', 'editorial-calendar'))) ?>;
224
  edcal.str_scheduled = <?php echo(edcal_json_encode(__('Scheduled', 'editorial-calendar'))) ?>;
359
  <select name="status" id="edcal-status">
360
  <option value="draft"><?php _e('Draft', 'editorial-calendar') ?></option>
361
  <option value="pending"><?php _e('Pending Review', 'editorial-calendar') ?></option>
362
+ <?php if ( current_user_can('publish_posts') ) {?>
363
+ <option id="futureoption" value="future"><?php _e('Scheduled', 'editorial-calendar') ?></option>
364
+ <?php } ?>
365
  </select>
366
  </span>
367
  </label>
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: cvernon, justinstresslimit, MaryVogt, zgrossbart
3
  Tags: posts, post, calendar, AJAX, admin, administration
4
  Requires at least: 2.8.5
5
  Tested up to: 3.0.1
6
- Stable tag: 1.0
7
 
8
  The Editorial Calendar makes it possible to see all your posts and drag and drop them to manage your blog.
9
 
@@ -50,6 +50,18 @@ From time to time people write articles about the editorial calendar. We apprec
50
 
51
  <a href="http://www.smashingmagazine.com/2010/08/30/the-importance-of-consistency-using-editorial-calendars-and-style-guides/">Blogging For Web Designers: Editorial Calendars and Style Guides</a> by <a href="http://jessica.smashingmagazine.com/">Jessica Bordeau</a> at <a href="http://www.smashingmagazine.com/">Smashing Magazine</a>
52
 
 
 
 
 
 
 
 
 
 
 
 
 
53
  <a href="http://chrisg.org/drag-and-drop-post-scheduling-with-the-editorial-calendar-wordpress-plugin/">Drag and Drop Post Scheduling with the Editorial Calendar WordPress plugin</a> by <a href="http://chrisg.org/">Chris Garrett</a>
54
 
55
  <a href="http://theincidentaleconomist.com/wordpress-plug-in-plug-editorial-calendar/">WordPress Plug-In Plug: Editorial Calendar</a> on <a href="http://theincidentaleconomist.com/">The Incidental Economist</a>
@@ -135,6 +147,11 @@ Moving published posts can cause problems with some RSS feeds and is generally n
135
 
136
  == Changelog ==
137
 
 
 
 
 
 
138
  = 1.0 =
139
  * Fixed a scrolling issue where you can't click the action links on the last post if the individual day showing a scroll bar.
140
 
3
  Tags: posts, post, calendar, AJAX, admin, administration
4
  Requires at least: 2.8.5
5
  Tested up to: 3.0.1
6
+ Stable tag: 1.1
7
 
8
  The Editorial Calendar makes it possible to see all your posts and drag and drop them to manage your blog.
9
 
50
 
51
  <a href="http://www.smashingmagazine.com/2010/08/30/the-importance-of-consistency-using-editorial-calendars-and-style-guides/">Blogging For Web Designers: Editorial Calendars and Style Guides</a> by <a href="http://jessica.smashingmagazine.com/">Jessica Bordeau</a> at <a href="http://www.smashingmagazine.com/">Smashing Magazine</a>
52
 
53
+ <a href="http://thebloggingacademy.com/editorial-calendar-wordpress-plugin-review/">
54
+ Editorial Calendar WordPress plugin review</a> by <a href="http://thebloggingacademy.com/">The Blogging Academy</a>
55
+
56
+ <a href="http://www.disruptiveconversations.com/2010/09/brogan-is-right-the-editorial-calendar-wordpress-plugin-truly-rocks.html">Brogan is right - the "Editorial Calendar" WordPress plugin truly rocks!</a> by <a href="http://www.danyork.com/">Dan York</a>
57
+
58
+ <a href="http://www.socialbrandingblog.com/637/editorial-calendar-plugin-for-wordpress/">Editorial Calendar Plugin for WordPress</a> by <a href="http://www.socialbrandingblog.com/">Steve Campbell</a>
59
+
60
+ <a href="http://marketplacemommies.com/2010/an-editorial-calendar-plugin-for-wordpress/">
61
+ An Editorial Calendar Plugin For WordPress</a> by <a href="http://marketplacemommies.com/">Marketplace Mommies</a>
62
+
63
+ <a href="http://www.mequoda.com/articles/editorial-strategy/editorial-calendar-wp-plugin-review/">Great WP Plugin for Online Editors: Editorial Calendar</a> by <a href="http://www.mequoda.com/">Mequoda Daily</a>
64
+
65
  <a href="http://chrisg.org/drag-and-drop-post-scheduling-with-the-editorial-calendar-wordpress-plugin/">Drag and Drop Post Scheduling with the Editorial Calendar WordPress plugin</a> by <a href="http://chrisg.org/">Chris Garrett</a>
66
 
67
  <a href="http://theincidentaleconomist.com/wordpress-plug-in-plug-editorial-calendar/">WordPress Plug-In Plug: Editorial Calendar</a> on <a href="http://theincidentaleconomist.com/">The Incidental Economist</a>
147
 
148
  == Changelog ==
149
 
150
+ = 1.1 =
151
+ * There was a security hole in the calendar that allowed contributors to publish posts when they couldn't in the standard edit screen. We now only allow contributors to save drafts and schedule a post for review.
152
+ * Changed the easing we are using for the animation of the calendar so we can work with the BuddyPress plugin.
153
+ * Changed the text of the edit link on published posts from Republish to Edit.
154
+
155
  = 1.0 =
156
  * Fixed a scrolling issue where you can't click the action links on the last post if the individual day showing a scroll bar.
157
 
vid.png DELETED
Binary file