Version Description
The calendar now has a new major feature, the "drafts drawer," a post staging area where we make all unscheduled posts available to drag onto the calendar. You can also now drag posts from the calendar back into the drafts drawer to "un-schedule" them.
Moved around functions in the js and css to be a bit more readable, and added table of contents to css file.
Updated css of Screen Options to be more core WordPress.
Download this release
Release Info
Developer | zgrossbart |
Plugin | Editorial Calendar |
Version | 2.0 |
Comparing to | |
See all releases |
Code changes from version 1.9.1 to 2.0
- edcal.css +235 -136
- edcal.js +531 -299
- edcal.php +200 -121
- edcal_test.js +109 -1
- languages/editorial-calendar-fr_FR.mo +0 -0
- languages/editorial-calendar-fr_FR.po +113 -119
- languages/editorial-calendar-pt_BR.mo +0 -0
- languages/editorial-calendar-pt_BR.po +23 -78
- languages/editorial-calendar-template.pot +182 -0
- lib/languages/{date-fr_FR.js → date-fr-FR.js} +0 -0
- readme.txt +19 -7
- screenshot-1.png +0 -0
- screenshot-2.png +0 -0
- screenshot-3.png +0 -0
- screenshot-4.png +0 -0
- screenshot-5.png +0 -0
- screenshot-6.png +0 -0
- screenshot-7.png +0 -0
edcal.css
CHANGED
@@ -13,7 +13,37 @@
|
|
13 |
* limitations under the License.
|
14 |
*
|
15 |
******************************************************************************/
|
16 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
17 |
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, font, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td {
|
18 |
background: none repeat scroll 0 0 transparent;
|
19 |
border: 0 none;
|
@@ -21,18 +51,103 @@ html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockq
|
|
21 |
outline: 0 none;
|
22 |
padding: 0;
|
23 |
}
|
|
|
|
|
|
|
24 |
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
35 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
36 |
|
37 |
#cal_cont, #edcal_scrollable {
|
38 |
-x-system-font:none;
|
@@ -43,17 +158,90 @@ html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockq
|
|
43 |
font-style:normal;
|
44 |
font-variant:normal;
|
45 |
font-weight:normal;
|
46 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
47 |
}
|
48 |
|
49 |
#cal {
|
50 |
position:absolute;
|
51 |
-
|
52 |
/* this time we have very large space for the height */
|
53 |
height:100%;
|
54 |
margin-right: 10px;
|
55 |
}
|
56 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
57 |
.day {
|
58 |
border: 1px solid #ccc; /* this will add to total height in IE. So, 100% + 2px */
|
59 |
-moz-border-radius:3px;
|
@@ -80,10 +268,6 @@ html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockq
|
|
80 |
background: lightblue;
|
81 |
}
|
82 |
|
83 |
-
.row {
|
84 |
-
height: 100%;
|
85 |
-
}
|
86 |
-
|
87 |
.dayobj {
|
88 |
position: relative;
|
89 |
width: 100%;
|
@@ -106,6 +290,7 @@ html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockq
|
|
106 |
font-weight:bold;
|
107 |
text-align: right;
|
108 |
padding-right: 10px;
|
|
|
109 |
-moz-border-radius:2px 2px 0 0;
|
110 |
-webkit-border-radius:2px 2px 0 0;
|
111 |
-o-border-radius:2px 2px 0 0;
|
@@ -144,6 +329,10 @@ html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockq
|
|
144 |
color: white;
|
145 |
}
|
146 |
|
|
|
|
|
|
|
|
|
147 |
.post {
|
148 |
display: block;
|
149 |
list-style-type: none;
|
@@ -175,113 +364,21 @@ html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockq
|
|
175 |
background-color: #f5f5f5;
|
176 |
}
|
177 |
|
178 |
-
.dayhead {
|
179 |
-
text-align: left;
|
180 |
-
text-indent: 5px;
|
181 |
-
text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
|
182 |
-
color: #000;
|
183 |
-
line-height: 2.4em;
|
184 |
-
min-width: 10em;
|
185 |
-
}
|
186 |
-
|
187 |
-
.dayheadcont {
|
188 |
-
position: relative;
|
189 |
-
height: 34px;
|
190 |
-
top: 0px;
|
191 |
-
background:#e9e9e9;
|
192 |
-
background-image:-moz-linear-gradient(top,#f4f4f4,#e9e9e9);
|
193 |
-
background-image:-o-linear-gradient(top,#f4f4f4,#e9e9e9);
|
194 |
-
background-image:-webkit-gradient(linear,left top,left bottom,from(#f4f4f4),to(#e9e9e9));
|
195 |
-
background-image:-webkit-linear-gradient(top,#f4f4f4,#e9e9e9);
|
196 |
-
background-image:linear-gradient(top,#f4f4f4,#e9e9e9);
|
197 |
-
font-family:Georgia,"Times New Roman","Bitstream Charter",Times,serif;
|
198 |
-
font-size:14px;
|
199 |
-
border-top:1px solid #fff;
|
200 |
-
border-bottom:1px solid #dfdfdf;
|
201 |
-
-moz-border-radius:3px 3px 0 0;
|
202 |
-
-webkit-border-radius:3px 3px 0 0
|
203 |
-
-o-border-radius:3px 3px 0 0
|
204 |
-
border-radius:3px 3px 0 0
|
205 |
-
}
|
206 |
-
|
207 |
-
.dayhead.firstday {
|
208 |
-
margin-left: 5px;
|
209 |
-
}
|
210 |
-
|
211 |
-
.dayhead.lastday {
|
212 |
-
}
|
213 |
-
|
214 |
-
#cal_cont {
|
215 |
-
border:1px solid #dfdfdf;
|
216 |
-
padding-bottom:1px;
|
217 |
-
-moz-border-radius:4px;
|
218 |
-
-webkit-border-radius:4px;
|
219 |
-
-o-border-radius:4px;
|
220 |
-
border-radius:4px;
|
221 |
-
}
|
222 |
-
|
223 |
-
#topbar {
|
224 |
-
margin-bottom: 1em;
|
225 |
-
width: 100%;
|
226 |
-
margin-top: 1em;
|
227 |
-
position: relative;
|
228 |
-
height: 2em;
|
229 |
-
}
|
230 |
-
|
231 |
-
#topleft {
|
232 |
-
position: absolute;
|
233 |
-
left: 0px;
|
234 |
-
top: -14px;
|
235 |
-
width: auto;
|
236 |
-
}
|
237 |
-
|
238 |
-
#topright {
|
239 |
-
position: absolute;
|
240 |
-
right: 0px;
|
241 |
-
top: 0px;
|
242 |
-
width: auto;
|
243 |
-
text-align: right;
|
244 |
-
}
|
245 |
-
|
246 |
-
#moveToToday {
|
247 |
-
margin-left: 2em;
|
248 |
-
margin-right: 6px;
|
249 |
-
text-decoration: none;
|
250 |
-
}
|
251 |
-
|
252 |
.publish, .post.readonly {
|
253 |
color: #a4a4a4;
|
254 |
font-weight:normal;
|
255 |
}
|
256 |
|
257 |
-
#loadingcont {
|
258 |
-
position: relative;
|
259 |
-
}
|
260 |
-
|
261 |
-
#loading {
|
262 |
-
background-image: url('images/loading.gif');
|
263 |
-
background-repeat: no-repeat;
|
264 |
-
position: absolute;
|
265 |
-
width: 43px;
|
266 |
-
height: 43px;
|
267 |
-
display: block;
|
268 |
-
left: 20em;
|
269 |
-
top: -1.5em;
|
270 |
-
}
|
271 |
-
|
272 |
-
.loadingclass > .postlink, .tiploading, .loadingclass:hover > .postlink {
|
273 |
-
background-image: url('images/loading_post.gif');
|
274 |
-
background-position: top right;
|
275 |
-
background-repeat: no-repeat;
|
276 |
-
cursor: auto;
|
277 |
-
}
|
278 |
-
|
279 |
.postlist {
|
280 |
position: relative;
|
281 |
top:24px; /* 1.5em; */
|
282 |
overflow: auto;
|
283 |
}
|
284 |
|
|
|
|
|
|
|
|
|
285 |
/*.page-numbers {
|
286 |
text-decoration: none;
|
287 |
border-bottom-style: none;
|
@@ -291,9 +388,10 @@ html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockq
|
|
291 |
}*/
|
292 |
|
293 |
|
|
|
294 |
/* Quick Add/Edit Tooltip */
|
295 |
|
296 |
-
#
|
297 |
background: #f4f4f4;
|
298 |
width:500px;
|
299 |
border:1px solid #dfdfdf;
|
@@ -309,7 +407,7 @@ html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockq
|
|
309 |
z-index: 25;
|
310 |
}
|
311 |
|
312 |
-
.
|
313 |
padding: 10px;
|
314 |
position: relative;
|
315 |
border-top:1px solid #fff;
|
@@ -345,32 +443,32 @@ html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockq
|
|
345 |
right:10px;
|
346 |
}
|
347 |
|
348 |
-
#
|
349 |
padding-bottom:1.2em;
|
350 |
}
|
351 |
|
352 |
-
#edcal-title {
|
353 |
padding-top: 0.5em;
|
354 |
padding-bottom: 0.5em;
|
355 |
}
|
356 |
|
357 |
/*
|
358 |
TinyMCE Rich Editor and Media buttons are not currently used
|
359 |
-
#
|
360 |
-
#
|
361 |
height: 15em;
|
362 |
}
|
363 |
|
364 |
/*
|
365 |
-
#
|
366 |
font-size: 11px;
|
367 |
}
|
368 |
|
369 |
-
#
|
370 |
padding: 5px 0;
|
371 |
}*/
|
372 |
|
373 |
-
#
|
374 |
width: 9em;
|
375 |
background-color: white;
|
376 |
}
|
@@ -403,10 +501,8 @@ TinyMCE Rich Editor and Media buttons are not currently used
|
|
403 |
/* End Add/Edit Tooltip */
|
404 |
|
405 |
|
406 |
-
|
407 |
-
|
408 |
-
font-size:12px;
|
409 |
-
}
|
410 |
|
411 |
#edcal_weeks_pref {
|
412 |
width: 4em;
|
@@ -448,7 +544,6 @@ TinyMCE Rich Editor and Media buttons are not currently used
|
|
448 |
opacity: 1;
|
449 |
}
|
450 |
|
451 |
-
|
452 |
.colorselected {
|
453 |
opacity: 1;
|
454 |
}
|
@@ -458,6 +553,19 @@ TinyMCE Rich Editor and Media buttons are not currently used
|
|
458 |
-webkit-border-radius: 4px;
|
459 |
}
|
460 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
461 |
#feedbacksection {
|
462 |
margin-top: 15px;
|
463 |
padding: 1em;
|
@@ -485,12 +593,3 @@ TinyMCE Rich Editor and Media buttons are not currently used
|
|
485 |
margin-left: 1em;
|
486 |
}
|
487 |
|
488 |
-
#screen-meta #show-edcal-settings-link.show-settings {
|
489 |
-
background-position: right -1px;
|
490 |
-
}
|
491 |
-
|
492 |
-
#contextual-help-wrap {
|
493 |
-
margin-left: 8px;
|
494 |
-
padding: 0 0 10px;
|
495 |
-
}
|
496 |
-
|
13 |
* limitations under the License.
|
14 |
*
|
15 |
******************************************************************************/
|
16 |
+
|
17 |
+
/*
|
18 |
+
Table of Contents
|
19 |
+
- Reset
|
20 |
+
- Loading section
|
21 |
+
- Top bar #topbar, including prev/next month arrows at left and Show Today at right
|
22 |
+
- Drafts Drawer
|
23 |
+
- the Calendar Content #calcont
|
24 |
+
- day head container #dayheadcont [Monday, Tuesday etc]
|
25 |
+
- edcal scrollable area #edcal_scrollable [the main calendar pane]
|
26 |
+
- calendar #cal container
|
27 |
+
- day label table head
|
28 |
+
- row container .rowcont [absolutely positioned, top adjusted by js]
|
29 |
+
- row inner .row [positioned relative, within the rowcont
|
30 |
+
- days
|
31 |
+
- posts
|
32 |
+
- edcal_quickedit [new/edit posts popover]
|
33 |
+
- Screen options
|
34 |
+
- Feedback section [appears once after using the calendar 3 times]
|
35 |
+
*/
|
36 |
+
|
37 |
+
/*.row .day:first-child, .dayheadcont .dayhead:first-child {
|
38 |
+
margin-left:0 !important;
|
39 |
+
}
|
40 |
+
.rowcont { margin:0 !important; }
|
41 |
+
.day { float:left; }
|
42 |
+
*/
|
43 |
+
|
44 |
+
|
45 |
+
/* Reset & Utility */
|
46 |
+
|
47 |
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, font, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td {
|
48 |
background: none repeat scroll 0 0 transparent;
|
49 |
border: 0 none;
|
51 |
outline: 0 none;
|
52 |
padding: 0;
|
53 |
}
|
54 |
+
.clearfix:before, .clearfix:after { content:'\0020'; display:block; height:0; visibility:hidden; }
|
55 |
+
.clearfix:after { clear:both; }
|
56 |
+
.clearfix { zoom:1; }
|
57 |
|
58 |
+
|
59 |
+
|
60 |
+
/* Loading section */
|
61 |
+
|
62 |
+
#loadingcont {
|
63 |
+
position: relative;
|
64 |
+
}
|
65 |
+
|
66 |
+
#loading, #draftsdrawer_loading {
|
67 |
+
background-image: url('images/loading.gif');
|
68 |
+
background-repeat: no-repeat;
|
69 |
+
position: absolute;
|
70 |
+
width: 43px;
|
71 |
+
height: 43px;
|
72 |
+
display: block;
|
73 |
+
left: 20em;
|
74 |
+
top: -1.5em;
|
75 |
+
}
|
76 |
+
|
77 |
+
.loadingclass > .postlink, .tiploading, .loadingclass:hover > .postlink {
|
78 |
+
background-image: url('images/loading_post.gif');
|
79 |
+
background-position: top right;
|
80 |
+
background-repeat: no-repeat;
|
81 |
+
cursor: auto;
|
82 |
+
}
|
83 |
+
|
84 |
+
|
85 |
+
|
86 |
+
/* Top bar */
|
87 |
+
|
88 |
+
#topbar {
|
89 |
+
margin-bottom: 1em;
|
90 |
+
margin-top: 1em;
|
91 |
+
height:2em;
|
92 |
+
}
|
93 |
+
#topbar .tablenav-pages a {
|
94 |
+
font-weight:normal;
|
95 |
+
}
|
96 |
+
#topleft.tablenav-pages {
|
97 |
+
float:left;
|
98 |
+
}
|
99 |
+
#nextmonth, #prevmonth {
|
100 |
+
font-size:12px;
|
101 |
+
}
|
102 |
+
#topright button {
|
103 |
+
margin-left: 2em;
|
104 |
+
margin-right: 6px;
|
105 |
+
text-decoration: none;
|
106 |
+
}
|
107 |
+
|
108 |
+
|
109 |
+
|
110 |
+
/* Drafts Drawer */
|
111 |
+
|
112 |
+
#draftsdrawer_cont {
|
113 |
+
height:100%;
|
114 |
+
float:right;
|
115 |
+
display:none;
|
116 |
+
}
|
117 |
+
#draftsdrawer {
|
118 |
+
font-family:"Lucida Grande",Verdana,Arial,"Bitstream Vera Sans",sans-serif;
|
119 |
+
border:1px solid #dfdfdf;
|
120 |
+
padding-bottom:1px;
|
121 |
+
-moz-border-radius:4px;
|
122 |
+
-webkit-border-radius:4px;
|
123 |
+
-o-border-radius:4px;
|
124 |
+
border-radius:4px;
|
125 |
+
}
|
126 |
+
#draftsdrawer .dayheadcont { }
|
127 |
+
#draftsdrawer .dayhead {
|
128 |
+
float:none;
|
129 |
+
white-space: nowrap;
|
130 |
+
width: 100%;
|
131 |
+
overflow: hidden;
|
132 |
+
text-overflow: ellipsis;
|
133 |
+
min-width: 0px;
|
134 |
}
|
135 |
+
#draftsdrawer .day { border:0; }
|
136 |
+
#draftsdrawer .dayobj { height:auto; }
|
137 |
+
#draftsdrawer .postlist {
|
138 |
+
top:26px;
|
139 |
+
padding-left: 5px;
|
140 |
+
}
|
141 |
+
#draftsdrawer .posttime { display:none; }
|
142 |
+
#draftsdrawer_loading {
|
143 |
+
position:relative;
|
144 |
+
margin:2em 2em 0 2em;
|
145 |
+
top:0;
|
146 |
+
left:0;
|
147 |
+
}
|
148 |
+
|
149 |
+
|
150 |
+
/* Calendar container */
|
151 |
|
152 |
#cal_cont, #edcal_scrollable {
|
153 |
-x-system-font:none;
|
158 |
font-style:normal;
|
159 |
font-variant:normal;
|
160 |
font-weight:normal;
|
161 |
+
}
|
162 |
+
|
163 |
+
#cal_cont {
|
164 |
+
border:1px solid #dfdfdf;
|
165 |
+
padding-bottom:1px;
|
166 |
+
-moz-border-radius:4px;
|
167 |
+
-webkit-border-radius:4px;
|
168 |
+
-o-border-radius:4px;
|
169 |
+
border-radius:4px;
|
170 |
+
}
|
171 |
+
|
172 |
+
#edcal_scrollable {
|
173 |
+
/* required settings */
|
174 |
+
position:relative;
|
175 |
+
overflow:hidden;
|
176 |
+
|
177 |
+
/* This height will be reset with JavaScript */
|
178 |
+
height: 100%;
|
179 |
+
margin-top: 5px;
|
180 |
+
margin-left: 4px;
|
181 |
+
margin-right: 2px;
|
182 |
}
|
183 |
|
184 |
#cal {
|
185 |
position:absolute;
|
186 |
+
|
187 |
/* this time we have very large space for the height */
|
188 |
height:100%;
|
189 |
margin-right: 10px;
|
190 |
}
|
191 |
|
192 |
+
|
193 |
+
|
194 |
+
/* Day label table head */
|
195 |
+
|
196 |
+
.dayheadcont, .draftsdrawerheadcont {
|
197 |
+
position: relative;
|
198 |
+
height: 34px;
|
199 |
+
top: 0px;
|
200 |
+
background:#e9e9e9;
|
201 |
+
background-image:-moz-linear-gradient(top,#f4f4f4,#e9e9e9);
|
202 |
+
background-image:-o-linear-gradient(top,#f4f4f4,#e9e9e9);
|
203 |
+
background-image:-webkit-gradient(linear,left top,left bottom,from(#f4f4f4),to(#e9e9e9));
|
204 |
+
background-image:-webkit-linear-gradient(top,#f4f4f4,#e9e9e9);
|
205 |
+
background-image:linear-gradient(top,#f4f4f4,#e9e9e9);
|
206 |
+
font-family:Georgia,"Times New Roman","Bitstream Charter",Times,serif;
|
207 |
+
font-size:14px;
|
208 |
+
border-top:1px solid #fff;
|
209 |
+
border-bottom:1px solid #dfdfdf;
|
210 |
+
-moz-border-radius:3px 3px 0 0;
|
211 |
+
-webkit-border-radius:3px 3px 0 0
|
212 |
+
-o-border-radius:3px 3px 0 0
|
213 |
+
border-radius:3px 3px 0 0
|
214 |
+
}
|
215 |
+
|
216 |
+
.dayhead {
|
217 |
+
text-align: left;
|
218 |
+
text-indent: 5px;
|
219 |
+
text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
|
220 |
+
color: #000;
|
221 |
+
line-height: 2.4em;
|
222 |
+
min-width: 10em;
|
223 |
+
float:left;
|
224 |
+
}
|
225 |
+
|
226 |
+
.dayhead.firstday {
|
227 |
+
margin-left: 5px;
|
228 |
+
}
|
229 |
+
|
230 |
+
.dayhead.lastday {
|
231 |
+
}
|
232 |
+
|
233 |
+
|
234 |
+
|
235 |
+
/* Rows */
|
236 |
+
|
237 |
+
.row {
|
238 |
+
height: 100%;
|
239 |
+
}
|
240 |
+
|
241 |
+
|
242 |
+
|
243 |
+
/* Days */
|
244 |
+
|
245 |
.day {
|
246 |
border: 1px solid #ccc; /* this will add to total height in IE. So, 100% + 2px */
|
247 |
-moz-border-radius:3px;
|
268 |
background: lightblue;
|
269 |
}
|
270 |
|
|
|
|
|
|
|
|
|
271 |
.dayobj {
|
272 |
position: relative;
|
273 |
width: 100%;
|
290 |
font-weight:bold;
|
291 |
text-align: right;
|
292 |
padding-right: 10px;
|
293 |
+
line-height:1.8em;
|
294 |
-moz-border-radius:2px 2px 0 0;
|
295 |
-webkit-border-radius:2px 2px 0 0;
|
296 |
-o-border-radius:2px 2px 0 0;
|
329 |
color: white;
|
330 |
}
|
331 |
|
332 |
+
|
333 |
+
|
334 |
+
/* Posts */
|
335 |
+
|
336 |
.post {
|
337 |
display: block;
|
338 |
list-style-type: none;
|
364 |
background-color: #f5f5f5;
|
365 |
}
|
366 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
367 |
.publish, .post.readonly {
|
368 |
color: #a4a4a4;
|
369 |
font-weight:normal;
|
370 |
}
|
371 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
372 |
.postlist {
|
373 |
position: relative;
|
374 |
top:24px; /* 1.5em; */
|
375 |
overflow: auto;
|
376 |
}
|
377 |
|
378 |
+
.postlist li {
|
379 |
+
margin-bottom: 8px;
|
380 |
+
}
|
381 |
+
|
382 |
/*.page-numbers {
|
383 |
text-decoration: none;
|
384 |
border-bottom-style: none;
|
388 |
}*/
|
389 |
|
390 |
|
391 |
+
|
392 |
/* Quick Add/Edit Tooltip */
|
393 |
|
394 |
+
#edcal_quickedit {
|
395 |
background: #f4f4f4;
|
396 |
width:500px;
|
397 |
border:1px solid #dfdfdf;
|
407 |
z-index: 25;
|
408 |
}
|
409 |
|
410 |
+
.edcal_quickedit {
|
411 |
padding: 10px;
|
412 |
position: relative;
|
413 |
border-top:1px solid #fff;
|
443 |
right:10px;
|
444 |
}
|
445 |
|
446 |
+
#edcal_quickedit .inline-edit-row fieldset {
|
447 |
padding-bottom:1.2em;
|
448 |
}
|
449 |
|
450 |
+
#edcal-title { /* not sure this is being used */
|
451 |
padding-top: 0.5em;
|
452 |
padding-bottom: 0.5em;
|
453 |
}
|
454 |
|
455 |
/*
|
456 |
TinyMCE Rich Editor and Media buttons are not currently used
|
457 |
+
#edcal_quickedit .mceEditor,*/
|
458 |
+
#edcal_quickedit textarea {
|
459 |
height: 15em;
|
460 |
}
|
461 |
|
462 |
/*
|
463 |
+
#edcal_quickedit #cal_mediabar {
|
464 |
font-size: 11px;
|
465 |
}
|
466 |
|
467 |
+
#edcal_quickedit #media-buttons {
|
468 |
padding: 5px 0;
|
469 |
}*/
|
470 |
|
471 |
+
#edcal_quickedit #edcal-time {
|
472 |
width: 9em;
|
473 |
background-color: white;
|
474 |
}
|
501 |
/* End Add/Edit Tooltip */
|
502 |
|
503 |
|
504 |
+
|
505 |
+
/* Screen Options */
|
|
|
|
|
506 |
|
507 |
#edcal_weeks_pref {
|
508 |
width: 4em;
|
544 |
opacity: 1;
|
545 |
}
|
546 |
|
|
|
547 |
.colorselected {
|
548 |
opacity: 1;
|
549 |
}
|
553 |
-webkit-border-radius: 4px;
|
554 |
}
|
555 |
|
556 |
+
#screen-meta #show-edcal-settings-link.show-settings {
|
557 |
+
background-position: right -1px;
|
558 |
+
}
|
559 |
+
|
560 |
+
#contextual-help-wrap {
|
561 |
+
margin-left: 8px;
|
562 |
+
padding: 0 0 10px;
|
563 |
+
}
|
564 |
+
|
565 |
+
|
566 |
+
|
567 |
+
/* Feedback section */
|
568 |
+
|
569 |
#feedbacksection {
|
570 |
margin-top: 15px;
|
571 |
padding: 1em;
|
593 |
margin-left: 1em;
|
594 |
}
|
595 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
edcal.js
CHANGED
@@ -63,6 +63,12 @@
|
|
63 |
*/
|
64 |
var edcal = {
|
65 |
|
|
|
|
|
|
|
|
|
|
|
|
|
66 |
/*
|
67 |
This value is the number of weeks the user wants to see at one time
|
68 |
in the calendar.
|
@@ -205,19 +211,339 @@ var edcal = {
|
|
205 |
any flickering.
|
206 |
*/
|
207 |
windowHeight: 0,
|
208 |
-
|
|
|
|
|
|
|
|
|
|
|
209 |
ltr: 'ltr',
|
210 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
211 |
/*
|
212 |
This function aligns the grid in two directions. There
|
213 |
is a vertical grid with a row of each week and a horizontal
|
214 |
grid for each week with a list of days.
|
215 |
*/
|
216 |
alignGrid: function(/*string*/ gridid, /*int*/ cols, /*int*/ cellWidth, /*int*/ cellHeight, /*int*/ padding) {
|
|
|
|
|
|
|
|
|
217 |
var x = 0;
|
218 |
var y = 0;
|
219 |
var count = 1;
|
220 |
-
|
221 |
jQuery(gridid).each(function() {
|
222 |
jQuery(this).css('position', 'relative');
|
223 |
|
@@ -469,7 +795,16 @@ var edcal = {
|
|
469 |
|
470 |
edcal.draggablePost('#row' + edcal._wDate.toString(edcal.internalDateFormat) + ' li.post');
|
471 |
|
472 |
-
jQuery('#row' + edcal._wDate.toString(edcal.internalDateFormat) + ' > div > div.day')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
473 |
hoverClass: 'day-active',
|
474 |
accept: function(ui) {
|
475 |
/*
|
@@ -492,23 +827,21 @@ var edcal = {
|
|
492 |
greedy: true,
|
493 |
tolerance: 'pointer',
|
494 |
drop: function(event, ui) {
|
495 |
-
|
496 |
-
|
497 |
-
|
498 |
-
|
499 |
-
|
500 |
-
|
501 |
-
|
502 |
-
}
|
503 |
});
|
504 |
-
|
505 |
-
return jQuery('row' + edcal._wDate.toString(edcal.internalDateFormat));
|
506 |
},
|
507 |
|
508 |
/*
|
509 |
* Handle the drop when a user drags and drops a post.
|
510 |
*/
|
511 |
doDrop: function(/*string*/ parentId, /*string*/ postId, /*string*/ newDate, /*function*/ callback) {
|
|
|
512 |
var dayId = parentId;
|
513 |
|
514 |
|
@@ -541,6 +874,7 @@ var edcal = {
|
|
541 |
}, 500);
|
542 |
|
543 |
// Step 3. Add the item to the new DOM parent
|
|
|
544 |
jQuery('#' + newDate + ' .postlist').append(edcal.createPostItem(post, newDate));
|
545 |
|
546 |
|
@@ -593,7 +927,12 @@ var edcal = {
|
|
593 |
scrolling the calendar when that happens.
|
594 |
*/
|
595 |
handleDrag: function(event, ui) {
|
596 |
-
if (edcal.isMoving || edcal.isDragScrolling
|
|
|
|
|
|
|
|
|
|
|
597 |
return;
|
598 |
}
|
599 |
|
@@ -652,12 +991,13 @@ var edcal = {
|
|
652 |
* be much more adaptable to reference the class by name, but this is
|
653 |
* significantly faster. Especially on IE.
|
654 |
*/
|
|
|
655 |
jQuery('#' + dayobjId + ' > div > ul').append(edcal.createPostItem(post, dayobjId));
|
656 |
},
|
657 |
|
658 |
/*
|
659 |
Makes all the posts in the specified day draggable
|
660 |
-
and adds the
|
661 |
*/
|
662 |
addPostItemDragAndToolltip: function(/*string*/ dayobjId) {
|
663 |
edcal.draggablePost('#' + dayobjId + ' > div > ul > li');
|
@@ -678,7 +1018,12 @@ var edcal = {
|
|
678 |
timeout: 100000,
|
679 |
dataType: 'json',
|
680 |
success: function(res) {
|
681 |
-
|
|
|
|
|
|
|
|
|
|
|
682 |
if (res.error) {
|
683 |
/*
|
684 |
* If there was an error we need to remove the dropped
|
@@ -705,8 +1050,6 @@ var edcal = {
|
|
705 |
},
|
706 |
|
707 |
|
708 |
-
|
709 |
-
|
710 |
/*
|
711 |
* Confirms if you want to delete the specified post
|
712 |
*/
|
@@ -757,6 +1100,24 @@ var edcal = {
|
|
757 |
edcal.showForm(post);
|
758 |
return false;
|
759 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
760 |
|
761 |
/*
|
762 |
* Called when the Edit link for a post is clicked.
|
@@ -816,16 +1177,26 @@ var edcal = {
|
|
816 |
} else {
|
817 |
time = Date.parse('10:00:00'); // If we don't have a time set, default it to 10am
|
818 |
}
|
819 |
-
|
820 |
-
var
|
821 |
-
|
822 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
823 |
var url = edcal.ajax_url() + '&action=edcal_savepost';
|
824 |
var postData = 'date=' + formattedDate +
|
825 |
'&title=' + encodeURIComponent(post.title) +
|
826 |
'&content=' + encodeURIComponent(post.content) +
|
827 |
'&id=' + encodeURIComponent(post.id) +
|
828 |
'&status=' + encodeURIComponent(post.status);
|
|
|
|
|
|
|
|
|
829 |
|
830 |
if (edcal.getUrlVars().post_type) {
|
831 |
postData += '&post_type=' + encodeURIComponent(edcal.getUrlVars().post_type);
|
@@ -844,7 +1215,7 @@ var edcal = {
|
|
844 |
dataType: 'json',
|
845 |
success: function(res) {
|
846 |
jQuery('#edit-slug-buttons').removeClass('tiploading');
|
847 |
-
jQuery('#
|
848 |
jQuery('#edcal_scrollable').data('scrollable').getConf().keyboard = true;
|
849 |
if (res.error) {
|
850 |
/*
|
@@ -868,12 +1239,18 @@ var edcal = {
|
|
868 |
window.location = res.post.editlink.replace('&', '&');
|
869 |
} else {
|
870 |
|
|
|
|
|
|
|
|
|
|
|
|
|
871 |
if (res.post.id) {
|
872 |
-
edcal.removePostItem(
|
873 |
}
|
874 |
|
875 |
-
edcal.addPostItem(res.post,
|
876 |
-
edcal.addPostItemDragAndToolltip(
|
877 |
}
|
878 |
}
|
879 |
|
@@ -885,7 +1262,7 @@ var edcal = {
|
|
885 |
},
|
886 |
error: function(xhr) {
|
887 |
jQuery('#edit-slug-buttons').removeClass('tiploading');
|
888 |
-
jQuery('#
|
889 |
jQuery('#edcal_scrollable').data('scrollable').getConf().keyboard = true;
|
890 |
edcal.showError(edcal.general_error);
|
891 |
if (xhr.responseText) {
|
@@ -902,7 +1279,7 @@ var edcal = {
|
|
902 |
serializePost: function() {
|
903 |
var post = {};
|
904 |
|
905 |
-
jQuery('#
|
906 |
post[this.name] = this.value;
|
907 |
});
|
908 |
return post;
|
@@ -913,13 +1290,23 @@ var edcal = {
|
|
913 |
*/
|
914 |
showForm: function(post) {
|
915 |
edcal.resetForm();
|
|
|
|
|
|
|
|
|
|
|
|
|
916 |
|
917 |
// show tooltip
|
918 |
-
jQuery('#
|
919 |
jQuery('#edcal_scrollable').data('scrollable').getConf().keyboard = false;
|
920 |
|
921 |
if (!post.id) {
|
922 |
-
|
|
|
|
|
|
|
|
|
923 |
} else {
|
924 |
jQuery('#tooltiptitle').text(sprintf(edcal.str_edit_post_title, post.typeTitle, edcal.getDayFromDayId(post.date).toString(edcal.previewDateFormat)));
|
925 |
|
@@ -971,31 +1358,17 @@ var edcal = {
|
|
971 |
|
972 |
/*
|
973 |
* Put the focus in the post title field when the tooltip opens.
|
974 |
-
*/
|
975 |
-
|
976 |
-
jQuery('#edcal-title-new-field').focus();
|
977 |
-
jQuery('#edcal-title-new-field').select();
|
978 |
-
|
979 |
-
/*
|
980 |
-
tb_init('a.thickbox, area.thickbox, input.thickbox');
|
981 |
-
|
982 |
-
edCanvas = document.getElementById('content');
|
983 |
-
edInsertContent = null;
|
984 |
|
985 |
-
jQuery('
|
986 |
-
|
987 |
-
tinyMCE.get('content').focus();
|
988 |
-
tinyMCE.activeEditor.windowManager.bookmark = tinyMCE.activeEditor.selection.getBookmark('simple');
|
989 |
-
}
|
990 |
-
});
|
991 |
-
*/
|
992 |
},
|
993 |
|
994 |
/*
|
995 |
* Hides the add/edit form
|
996 |
*/
|
997 |
hideForm: function() {
|
998 |
-
jQuery('#
|
999 |
jQuery('#edcal_scrollable').data('scrollable').getConf().keyboard = true;
|
1000 |
edcal.resetForm();
|
1001 |
},
|
@@ -1004,7 +1377,7 @@ var edcal = {
|
|
1004 |
* Clears all the input values in the add/edit form
|
1005 |
*/
|
1006 |
resetForm: function() {
|
1007 |
-
jQuery('#
|
1008 |
this.value = '';
|
1009 |
});
|
1010 |
|
@@ -1039,7 +1412,7 @@ var edcal = {
|
|
1039 |
specified day.
|
1040 |
*/
|
1041 |
findPostForId: function(/*string*/ dayobjId, /*string*/ postId) {
|
1042 |
-
|
1043 |
for (var i = 0; i < edcal.posts[dayobjId].length; i++) {
|
1044 |
if (edcal.posts[dayobjId][i] &&
|
1045 |
'post-' + edcal.posts[dayobjId][i].id === postId) {
|
@@ -1055,10 +1428,11 @@ var edcal = {
|
|
1055 |
* Removes a post from the HTML and the posts cache.
|
1056 |
*/
|
1057 |
removePostItem: function(/*string*/ dayobjId, /*string*/ postId) {
|
|
|
1058 |
if (edcal.findPostForId(dayobjId, postId)) {
|
1059 |
for (var i = 0; i < edcal.posts[dayobjId].length; i++) {
|
1060 |
-
if (edcal.posts[dayobjId][i] &&
|
1061 |
-
|
1062 |
edcal.posts[dayobjId][i] = null;
|
1063 |
jQuery('#' + postId).remove();
|
1064 |
}
|
@@ -1089,25 +1463,39 @@ var edcal = {
|
|
1089 |
specified ID.
|
1090 |
*/
|
1091 |
showActionLinks: function(/*string*/ postid) {
|
|
|
|
|
|
|
|
|
|
|
|
|
1092 |
var post = edcal.findPostForId(jQuery('#' + postid).parent().parent().parent().attr('id'), postid);
|
1093 |
-
|
1094 |
if (edcal.inDrag || !edcal.isPostEditable(post)) {
|
1095 |
return;
|
1096 |
}
|
1097 |
-
|
1098 |
var elem = jQuery('#' + postid + ' > div.postactions');
|
1099 |
-
|
1100 |
-
elem.
|
1101 |
-
|
1102 |
-
|
1103 |
-
|
1104 |
-
|
1105 |
-
|
1106 |
-
|
1107 |
-
|
1108 |
-
|
1109 |
-
|
1110 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1111 |
},
|
1112 |
|
1113 |
/*
|
@@ -1115,8 +1503,15 @@ var edcal = {
|
|
1115 |
post ID.
|
1116 |
*/
|
1117 |
hideActionLinks: function(/*string*/ postid) {
|
1118 |
-
|
1119 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1120 |
},
|
1121 |
|
1122 |
/*
|
@@ -1190,27 +1585,34 @@ var edcal = {
|
|
1190 |
if (edcal.timePref) {
|
1191 |
posttitle = '<span class="posttime">' + post.formattedtime + '</span> ' + posttitle;
|
1192 |
}
|
1193 |
-
|
1194 |
if (edcal.authorPref) {
|
1195 |
posttitle = sprintf(edcal.str_by, posttitle, '<span class="postauthor">' + post.author + '</span>');
|
1196 |
}
|
|
|
1197 |
|
1198 |
var classString = '';
|
1199 |
|
1200 |
if (edcal.isPostMovable(post)) {
|
1201 |
return '<li onmouseover="edcal.showActionLinks(\'post-' + post.id + '\');" ' +
|
1202 |
'onmouseout="edcal.hideActionLinks(\'post-' + post.id + '\');" ' +
|
1203 |
-
'id="post-' + post.id + '" class="post ' + post.status + ' ' + edcal.getPostEditableClass(post) + '"><div class="postlink ' + classString + '">' +
|
|
|
|
|
1204 |
'<div class="postactions">' +
|
1205 |
'<a href="' + post.editlink + '">' + edcal.str_edit + '</a> | ' +
|
1206 |
'<a href="#" onclick="edcal.editPost(' + post.id + '); return false;">' + edcal.str_quick_edit + '</a> | ' +
|
1207 |
'<a href="' + post.dellink + '" onclick="return edcal.confirmDelete(\'' + post.title + '\');">' + edcal.str_del + '</a> | ' +
|
1208 |
-
'<a href="' + post.permalink + '"
|
|
|
|
|
1209 |
'</div></li>';
|
1210 |
} else {
|
1211 |
return '<li onmouseover="edcal.showActionLinks(\'post-' + post.id + '\');" ' +
|
1212 |
'onmouseout="edcal.hideActionLinks(\'post-' + post.id + '\');" ' +
|
1213 |
-
'id="post-' + post.id + '" class="post ' + post.status + ' ' + edcal.getPostEditableClass(post) + '"><div class="postlink ' + classString + '">' +
|
|
|
|
|
1214 |
'<div class="postactions">' +
|
1215 |
'<a href="' + post.editlink + '">' + edcal.str_republish + '</a> | ' +
|
1216 |
'<a href="' + post.permalink + '">' + edcal.str_view + '</a>' +
|
@@ -1254,7 +1656,7 @@ var edcal = {
|
|
1254 |
/*
|
1255 |
* If the add/edit post form is visible, don't go anywhere.
|
1256 |
*/
|
1257 |
-
if (jQuery('#
|
1258 |
return;
|
1259 |
}
|
1260 |
|
@@ -1542,6 +1944,7 @@ var edcal = {
|
|
1542 |
*/
|
1543 |
savePosition: function() {
|
1544 |
var cal = jQuery('#edcal_scrollable');
|
|
|
1545 |
edcal.position = {
|
1546 |
top: cal.offset().top,
|
1547 |
bottom: cal.offset().top + cal.height()
|
@@ -1580,6 +1983,10 @@ var edcal = {
|
|
1580 |
'height: ' + dayHeight + 'px;' +
|
1581 |
'}' +
|
1582 |
'</style>');
|
|
|
|
|
|
|
|
|
1583 |
},
|
1584 |
|
1585 |
/*
|
@@ -1637,218 +2044,6 @@ var edcal = {
|
|
1637 |
|
1638 |
},
|
1639 |
|
1640 |
-
/*
|
1641 |
-
* Initializes the calendar
|
1642 |
-
*/
|
1643 |
-
init: function() {
|
1644 |
-
if (jQuery('#edcal_scrollable').length === 0) {
|
1645 |
-
/*
|
1646 |
-
* This means we are on a page without the editorial
|
1647 |
-
* calendar
|
1648 |
-
*/
|
1649 |
-
return;
|
1650 |
-
}
|
1651 |
-
|
1652 |
-
edcal.addFeedbackSection();
|
1653 |
-
|
1654 |
-
jQuery('#loading').hide();
|
1655 |
-
|
1656 |
-
jQuery('#edcal_scrollable').css('height', edcal.getCalHeight() + 'px');
|
1657 |
-
edcal.windowHeight = jQuery(window).height();
|
1658 |
-
|
1659 |
-
/*
|
1660 |
-
* Add the days of the week
|
1661 |
-
*/
|
1662 |
-
edcal.createDaysHeader();
|
1663 |
-
|
1664 |
-
/*
|
1665 |
-
* We start by initializting the scrollable. We use this to manage the
|
1666 |
-
* scrolling of the calendar, but don't actually call it to animate the
|
1667 |
-
* scrolling. We specify an easing here because the default is "swing"
|
1668 |
-
* and that has a conflict with JavaScript used in the BuddyPress plugin/
|
1669 |
-
*
|
1670 |
-
* This doesn't really change anything since the animation happens offscreen.
|
1671 |
-
*/
|
1672 |
-
jQuery('#edcal_scrollable').scrollable({
|
1673 |
-
vertical: true,
|
1674 |
-
size: edcal.weeksPref,
|
1675 |
-
keyboard: false,
|
1676 |
-
keyboardSteps: 1,
|
1677 |
-
speed: 100,
|
1678 |
-
easing: 'linear'
|
1679 |
-
});
|
1680 |
-
|
1681 |
-
var api = jQuery('#edcal_scrollable').scrollable();
|
1682 |
-
|
1683 |
-
api.getConf().keyboard = false;
|
1684 |
-
|
1685 |
-
/*
|
1686 |
-
When the user moves the calendar around we remember their
|
1687 |
-
date and save it in a cookie. Then we read the cookie back
|
1688 |
-
when we reload so the calendar stays where the user left
|
1689 |
-
it last.
|
1690 |
-
*/
|
1691 |
-
var curDate = jQuery.cookie('edcal_date');
|
1692 |
-
|
1693 |
-
if (curDate) {
|
1694 |
-
curDate = Date.parseExact(curDate, 'yyyy-dd-MM');
|
1695 |
-
edcal.output('Resetting to date from the edcal_Date cookie: ' + curDate);
|
1696 |
-
} else {
|
1697 |
-
curDate = Date.today();
|
1698 |
-
}
|
1699 |
-
|
1700 |
-
edcal.moveTo(curDate.clone());
|
1701 |
-
|
1702 |
-
jQuery('#edcal_scrollable').bind('mousewheel', function(event, delta) {
|
1703 |
-
var dir = delta > 0 ? false : true, vel = Math.abs(delta);
|
1704 |
-
edcal.output(dir + ' at a velocity of ' + vel);
|
1705 |
-
|
1706 |
-
if (!edcal.isMoving && vel > 0.2) {
|
1707 |
-
edcal.move(1, dir);
|
1708 |
-
}
|
1709 |
-
|
1710 |
-
return false;
|
1711 |
-
});
|
1712 |
-
|
1713 |
-
/*
|
1714 |
-
We are handling all of our own events so we just cancel all events from
|
1715 |
-
the scrollable.
|
1716 |
-
*/
|
1717 |
-
api.onBeforeSeek(function(evt, direction) {
|
1718 |
-
return false;
|
1719 |
-
});
|
1720 |
-
|
1721 |
-
/*
|
1722 |
-
* We also want to listen for a few other key events
|
1723 |
-
*/
|
1724 |
-
jQuery(document).bind('keydown', function(evt) {
|
1725 |
-
//if (evt.altKey || evt.ctrlKey) { return; }
|
1726 |
-
//output("evt.altKey: " + evt.altKey);
|
1727 |
-
//output("evt.keyCode: " + evt.keyCode);
|
1728 |
-
//output("evt.ctrlKey: " + evt.ctrlKey);
|
1729 |
-
|
1730 |
-
if (evt.keyCode === 27) { //escape key
|
1731 |
-
edcal.hideForm();
|
1732 |
-
return false;
|
1733 |
-
}
|
1734 |
-
|
1735 |
-
if (jQuery('#tooltip').is(':visible')) {
|
1736 |
-
return;
|
1737 |
-
}
|
1738 |
-
|
1739 |
-
if ((evt.keyCode === 40 && !(evt.altKey || evt.ctrlKey))) { // down arrow key
|
1740 |
-
edcal.move(1, true);
|
1741 |
-
return false;
|
1742 |
-
} else if ((evt.keyCode === 38 && !(evt.altKey || evt.ctrlKey))) { // up arrow key
|
1743 |
-
edcal.move(1, false);
|
1744 |
-
return false;
|
1745 |
-
} else if ((evt.keyCode === 34 && !(evt.altKey || evt.ctrlKey)) || //page down
|
1746 |
-
evt.keyCode === 40 && evt.ctrlKey) { // Ctrl+down down arrow
|
1747 |
-
edcal.move(edcal.weeksPref, true);
|
1748 |
-
return false;
|
1749 |
-
} else if ((evt.keyCode === 33 && !(evt.altKey || evt.ctrlKey)) || //page up
|
1750 |
-
evt.keyCode === 38 && evt.ctrlKey) { // Ctrl+up up arrow
|
1751 |
-
edcal.move(edcal.weeksPref, false);
|
1752 |
-
return false;
|
1753 |
-
}
|
1754 |
-
|
1755 |
-
return true;
|
1756 |
-
});
|
1757 |
-
|
1758 |
-
edcal.getPosts(edcal.nextStartOfWeek(curDate).add(-3).weeks(),
|
1759 |
-
edcal.nextStartOfWeek(curDate).add(edcal.weeksPref + 3).weeks());
|
1760 |
-
|
1761 |
-
/*
|
1762 |
-
Now we bind the listeners for all of our links and the window
|
1763 |
-
resize.
|
1764 |
-
*/
|
1765 |
-
jQuery('#moveToToday').click(function() {
|
1766 |
-
edcal.moveTo(Date.today());
|
1767 |
-
edcal.getPosts(edcal.nextStartOfWeek(Date.today()).add(-3).weeks(),
|
1768 |
-
edcal.nextStartOfWeek(Date.today()).add(edcal.weeksPref + 3).weeks());
|
1769 |
-
return false;
|
1770 |
-
});
|
1771 |
-
|
1772 |
-
jQuery('#prevmonth').click(function() {
|
1773 |
-
edcal.move(edcal.weeksPref, false);
|
1774 |
-
return false;
|
1775 |
-
});
|
1776 |
-
|
1777 |
-
jQuery('#nextmonth').click(function() {
|
1778 |
-
edcal.move(edcal.weeksPref, true);
|
1779 |
-
return false;
|
1780 |
-
});
|
1781 |
-
|
1782 |
-
/*
|
1783 |
-
We used to listen to resize events so we could make the calendar the right size
|
1784 |
-
for the current window when it changed size, but this was causing a problem with
|
1785 |
-
WordPress 3.3 and it never worked properly because the scroll position was a little
|
1786 |
-
off so we are just skipping it.
|
1787 |
-
*/
|
1788 |
-
/*function resizeWindow(e) {
|
1789 |
-
if (edcal.windowHeight != jQuery(window).height()) {
|
1790 |
-
jQuery('#edcal_scrollable').css('height', edcal.getCalHeight() + 'px');
|
1791 |
-
edcal.windowHeight = jQuery(window).height();
|
1792 |
-
edcal.savePosition();
|
1793 |
-
}
|
1794 |
-
}
|
1795 |
-
jQuery(window).bind('resize', resizeWindow);*/
|
1796 |
-
|
1797 |
-
jQuery('#newPostScheduleButton').live('click', function(evt) {
|
1798 |
-
// if the button is disabled, don't do anything
|
1799 |
-
if (jQuery(this).hasClass('disabled')) {
|
1800 |
-
return false;
|
1801 |
-
}
|
1802 |
-
// Otherwise,
|
1803 |
-
// make sure we can't make duplicate posts by clicking twice quickly
|
1804 |
-
jQuery(this).addClass('disabled');
|
1805 |
-
// and save the post
|
1806 |
-
return edcal.savePost(null, false, true);
|
1807 |
-
});
|
1808 |
-
|
1809 |
-
jQuery('#edcal-title-new-field').bind('keyup', function(evt) {
|
1810 |
-
if (jQuery('#edcal-title-new-field').val().length > 0 && jQuery('#edcal-time').val().length > 0) {
|
1811 |
-
jQuery('#newPostScheduleButton').removeClass('disabled');
|
1812 |
-
} else {
|
1813 |
-
jQuery('#newPostScheduleButton').addClass('disabled');
|
1814 |
-
}
|
1815 |
-
|
1816 |
-
if (evt.keyCode == 13) { // enter key
|
1817 |
-
/*
|
1818 |
-
* If the user presses enter we want to save the draft.
|
1819 |
-
*/
|
1820 |
-
return edcal.savePost(null, true);
|
1821 |
-
}
|
1822 |
-
});
|
1823 |
-
|
1824 |
-
jQuery('#edcal-status').bind('change', function(evt) {
|
1825 |
-
edcal.updatePublishButton();
|
1826 |
-
});
|
1827 |
-
|
1828 |
-
jQuery('#edcal_weeks_pref').live('keyup', function(evt) {
|
1829 |
-
if (jQuery('#edcal_weeks_pref').val().length > 0) {
|
1830 |
-
jQuery('#edcal_applyoptions').removeClass('disabled');
|
1831 |
-
} else {
|
1832 |
-
jQuery('#edcal_applyoptions').addClass('disabled');
|
1833 |
-
}
|
1834 |
-
|
1835 |
-
if (evt.keyCode == 13) { // enter key
|
1836 |
-
edcal.saveOptions();
|
1837 |
-
}
|
1838 |
-
|
1839 |
-
});
|
1840 |
-
|
1841 |
-
edcal.savePosition();
|
1842 |
-
|
1843 |
-
edcal.addOptionsSection();
|
1844 |
-
|
1845 |
-
jQuery('#edcal-time').timePicker({
|
1846 |
-
show24Hours: edcal.timeFormat === 'H:i' || edcal.timeFormat === 'G:i',
|
1847 |
-
separator: ':',
|
1848 |
-
step: 30
|
1849 |
-
});
|
1850 |
-
},
|
1851 |
-
|
1852 |
/*
|
1853 |
This function updates the text of te publish button in the quick
|
1854 |
edit dialog to match the current operation.
|
@@ -1868,12 +2063,25 @@ var edcal = {
|
|
1868 |
the specified post on the server.
|
1869 |
*/
|
1870 |
changeDate: function(/*string*/ newdate, /*Post*/ post, /*function*/ callback) {
|
1871 |
-
edcal.output('
|
1872 |
-
|
|
|
|
|
|
|
|
|
|
|
1873 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1874 |
var url = edcal.ajax_url() + '&action=edcal_changedate&postid=' + post.id +
|
1875 |
'&postStatus=' + post.status +
|
1876 |
-
'&newdate=' + newdateFormatted + '&olddate=' +
|
1877 |
|
1878 |
jQuery('#post-' + post.id).addClass('loadingclass');
|
1879 |
|
@@ -1882,8 +2090,12 @@ var edcal = {
|
|
1882 |
type: 'POST',
|
1883 |
processData: false,
|
1884 |
timeout: 100000,
|
|
|
1885 |
dataType: 'json',
|
1886 |
success: function(res) {
|
|
|
|
|
|
|
1887 |
if (res.error) {
|
1888 |
/*
|
1889 |
* If there was an error we need to remove the dropped
|
@@ -1899,9 +2111,19 @@ var edcal = {
|
|
1899 |
}
|
1900 |
}
|
1901 |
|
1902 |
-
|
1903 |
-
|
1904 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1905 |
|
1906 |
if (callback) {
|
1907 |
callback(res);
|
@@ -1925,7 +2147,9 @@ var edcal = {
|
|
1925 |
specified dates.
|
1926 |
*/
|
1927 |
getPosts: function(/*Date*/ from, /*Date*/ to, /*function*/ callback) {
|
1928 |
-
|
|
|
|
|
1929 |
|
1930 |
var shouldGet = edcal.cacheDates[from];
|
1931 |
|
@@ -1935,7 +2159,7 @@ var edcal = {
|
|
1935 |
* that we have already covered. This is cutting down on
|
1936 |
* it somewhat, but we could get much better about this.
|
1937 |
*/
|
1938 |
-
edcal.output('Using cached results for posts from ' + from.toString('dd-MMM-yyyy') + ' to ' + to.toString('dd-MMM-yyyy'));
|
1939 |
|
1940 |
if (callback) {
|
1941 |
callback();
|
@@ -1960,6 +2184,7 @@ var edcal = {
|
|
1960 |
timeout: 100000,
|
1961 |
dataType: 'text',
|
1962 |
success: function(res) {
|
|
|
1963 |
jQuery('#loading').hide();
|
1964 |
/*
|
1965 |
* These result here can get pretty large on a busy blog and
|
@@ -1999,9 +2224,13 @@ var edcal = {
|
|
1999 |
* case to make sure we don't get into trouble.
|
2000 |
*/
|
2001 |
post.date = post.date.replace(post.date.substring(2, 3), post.date.substring(2, 3).toUpperCase());
|
|
|
|
|
2002 |
|
|
|
2003 |
edcal.removePostItem(post.date, 'post-' + post.id);
|
2004 |
edcal.addPostItem(post, post.date);
|
|
|
2005 |
postDates[postDates.length] = post.date;
|
2006 |
}
|
2007 |
}
|
@@ -2017,7 +2246,7 @@ var edcal = {
|
|
2017 |
* stop complaining.
|
2018 |
*/
|
2019 |
setTimeout(function() {
|
2020 |
-
edcal.output('Finished adding draggable support to ' + postDates.length + ' posts.');
|
2021 |
jQuery.each(postDates, function(i, postDate) {
|
2022 |
edcal.addPostItemDragAndToolltip(postDate);
|
2023 |
});
|
@@ -2096,7 +2325,7 @@ var edcal = {
|
|
2096 |
},
|
2097 |
|
2098 |
/*
|
2099 |
-
This function adds the
|
2100 |
WordPress had a hook so I could provide this in PHP, but as of version 2.9.1
|
2101 |
they just have an internal loop for their own screen options tabs so we're
|
2102 |
doing this in JavaScript.
|
@@ -2108,7 +2337,9 @@ var edcal = {
|
|
2108 |
'id="show-edcal-settings-link" ' +
|
2109 |
'onclick="edcal.toggleOptions(); return false;" ' +
|
2110 |
'href="#" ' +
|
2111 |
-
'
|
|
|
|
|
2112 |
'</div>';
|
2113 |
|
2114 |
if (jQuery('#screen-meta-links').length === 0) {
|
@@ -2190,7 +2421,7 @@ var edcal = {
|
|
2190 |
|
2191 |
jQuery('#screen-meta').show();
|
2192 |
|
2193 |
-
jQuery('#show-edcal-settings-link').
|
2194 |
} else {
|
2195 |
jQuery('#contextual-help-wrap').slideUp('fast');
|
2196 |
|
@@ -2201,7 +2432,7 @@ var edcal = {
|
|
2201 |
|
2202 |
edcal.helpMeta = null;
|
2203 |
|
2204 |
-
jQuery('#show-edcal-settings-link').
|
2205 |
jQuery('#contextual-help-link-wrap').css('visibility', '');
|
2206 |
}
|
2207 |
},
|
@@ -2387,9 +2618,10 @@ jQuery(document).ready(function() {
|
|
2387 |
* conflict with a JavaScript library imported by
|
2388 |
* another plugin.
|
2389 |
*/
|
|
|
2390 |
edcal.showFatalError(e.description);
|
2391 |
}
|
2392 |
-
|
2393 |
/*
|
2394 |
* The calendar supports unit tests through the QUnit framework,
|
2395 |
* but we don't want to load the extra files when we aren't running
|
63 |
*/
|
64 |
var edcal = {
|
65 |
|
66 |
+
/*
|
67 |
+
This final string represents the date which indicates to WordPress
|
68 |
+
that a post doesn't have a date.
|
69 |
+
*/
|
70 |
+
NO_DATE: '00000000',
|
71 |
+
|
72 |
/*
|
73 |
This value is the number of weeks the user wants to see at one time
|
74 |
in the calendar.
|
211 |
any flickering.
|
212 |
*/
|
213 |
windowHeight: 0,
|
214 |
+
|
215 |
+
|
216 |
+
/*
|
217 |
+
This variable indicates if the calendar is in left to right or right to
|
218 |
+
left display mode.
|
219 |
+
*/
|
220 |
ltr: 'ltr',
|
221 |
|
222 |
+
/*
|
223 |
+
This variable indicates if the drafts drawer is visible or not.
|
224 |
+
*/
|
225 |
+
isDraftsDrawerVisible: false,
|
226 |
+
|
227 |
+
/*
|
228 |
+
* Initializes the calendar
|
229 |
+
*/
|
230 |
+
init: function() {
|
231 |
+
if (jQuery('#edcal_scrollable').length === 0) {
|
232 |
+
/*
|
233 |
+
* This means we are on a page without the editorial
|
234 |
+
* calendar
|
235 |
+
*/
|
236 |
+
return;
|
237 |
+
}
|
238 |
+
|
239 |
+
edcal.addFeedbackSection();
|
240 |
+
|
241 |
+
var draftsDrawerVisible = jQuery.cookie('edcal_drafts_drawer');
|
242 |
+
if (draftsDrawerVisible === 'true') {
|
243 |
+
edcal.isDraftsDrawerVisible = true;
|
244 |
+
edcal.setDraftsDrawerVisible(edcal.isDraftsDrawerVisible);
|
245 |
+
}
|
246 |
+
|
247 |
+
jQuery('#loading').hide();
|
248 |
+
|
249 |
+
jQuery('#edcal_scrollable').css('height', edcal.getCalHeight() + 'px');
|
250 |
+
edcal.windowHeight = jQuery(window).height();
|
251 |
+
|
252 |
+
/*
|
253 |
+
* Add the days of the week
|
254 |
+
*/
|
255 |
+
edcal.createDaysHeader();
|
256 |
+
|
257 |
+
/*
|
258 |
+
* We start by initializting the scrollable. We use this to manage the
|
259 |
+
* scrolling of the calendar, but don't actually call it to animate the
|
260 |
+
* scrolling. We specify an easing here because the default is "swing"
|
261 |
+
* and that has a conflict with JavaScript used in the BuddyPress plugin/
|
262 |
+
*
|
263 |
+
* This doesn't really change anything since the animation happens offscreen.
|
264 |
+
*/
|
265 |
+
jQuery('#edcal_scrollable').scrollable({
|
266 |
+
vertical: true,
|
267 |
+
size: edcal.weeksPref,
|
268 |
+
keyboard: false,
|
269 |
+
keyboardSteps: 1,
|
270 |
+
speed: 100,
|
271 |
+
easing: 'linear'
|
272 |
+
});
|
273 |
+
|
274 |
+
var api = jQuery('#edcal_scrollable').scrollable();
|
275 |
+
|
276 |
+
api.getConf().keyboard = false;
|
277 |
+
|
278 |
+
/*
|
279 |
+
When the user moves the calendar around we remember their
|
280 |
+
date and save it in a cookie. Then we read the cookie back
|
281 |
+
when we reload so the calendar stays where the user left
|
282 |
+
it last.
|
283 |
+
*/
|
284 |
+
var curDate = jQuery.cookie('edcal_date');
|
285 |
+
|
286 |
+
if (curDate) {
|
287 |
+
curDate = Date.parseExact(curDate, 'yyyy-dd-MM');
|
288 |
+
edcal.output('Resetting to date from the edcal_Date cookie: ' + curDate);
|
289 |
+
} else {
|
290 |
+
curDate = Date.today();
|
291 |
+
}
|
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.
|
309 |
+
*/
|
310 |
+
api.onBeforeSeek(function(evt, direction) {
|
311 |
+
return false;
|
312 |
+
});
|
313 |
+
|
314 |
+
/*
|
315 |
+
* We also want to listen for a few other key events
|
316 |
+
*/
|
317 |
+
jQuery(document).bind('keydown', function(evt) {
|
318 |
+
//if (evt.altKey || evt.ctrlKey) { return; }
|
319 |
+
//edcal.output("evt.altKey: " + evt.altKey);
|
320 |
+
//edcal.output("evt.keyCode: " + evt.keyCode);
|
321 |
+
//edcal.output("evt.ctrlKey: " + evt.ctrlKey);
|
322 |
+
|
323 |
+
if (evt.keyCode === 27) { //escape key
|
324 |
+
edcal.hideForm();
|
325 |
+
return false;
|
326 |
+
}
|
327 |
+
|
328 |
+
if (jQuery('#edcal_quickedit').is(':visible')) {
|
329 |
+
return;
|
330 |
+
}
|
331 |
+
|
332 |
+
if ((evt.keyCode === 40 && !(evt.altKey || evt.ctrlKey))) { // down arrow key
|
333 |
+
edcal.move(1, true);
|
334 |
+
return false;
|
335 |
+
} else if ((evt.keyCode === 38 && !(evt.altKey || evt.ctrlKey))) { // up arrow key
|
336 |
+
edcal.move(1, false);
|
337 |
+
return false;
|
338 |
+
} else if ((evt.keyCode === 34 && !(evt.altKey || evt.ctrlKey)) || //page down
|
339 |
+
evt.keyCode === 40 && evt.ctrlKey) { // Ctrl+down down arrow
|
340 |
+
edcal.move(edcal.weeksPref, true);
|
341 |
+
return false;
|
342 |
+
} else if ((evt.keyCode === 33 && !(evt.altKey || evt.ctrlKey)) || //page up
|
343 |
+
evt.keyCode === 38 && evt.ctrlKey) { // Ctrl+up up arrow
|
344 |
+
edcal.move(edcal.weeksPref, false);
|
345 |
+
return false;
|
346 |
+
}
|
347 |
+
});
|
348 |
+
|
349 |
+
edcal.getPosts(edcal.nextStartOfWeek(curDate).add(-3).weeks(),
|
350 |
+
edcal.nextStartOfWeek(curDate).add(edcal.weeksPref + 3).weeks());
|
351 |
+
|
352 |
+
/*
|
353 |
+
Now we bind the listeners for all of our links and the window
|
354 |
+
resize.
|
355 |
+
*/
|
356 |
+
jQuery('#moveToToday').click(function() {
|
357 |
+
edcal.moveTo(Date.today());
|
358 |
+
edcal.getPosts(edcal.nextStartOfWeek(Date.today()).add(-3).weeks(),
|
359 |
+
edcal.nextStartOfWeek(Date.today()).add(edcal.weeksPref + 3).weeks());
|
360 |
+
return false;
|
361 |
+
});
|
362 |
+
|
363 |
+
jQuery('#prevmonth').click(function() {
|
364 |
+
edcal.move(edcal.weeksPref, false);
|
365 |
+
return false;
|
366 |
+
});
|
367 |
+
|
368 |
+
jQuery('#nextmonth').click(function() {
|
369 |
+
edcal.move(edcal.weeksPref, true);
|
370 |
+
return false;
|
371 |
+
});
|
372 |
+
|
373 |
+
/*
|
374 |
+
We used to listen to resize events so we could make the calendar the right size
|
375 |
+
for the current window when it changed size, but this was causing a problem with
|
376 |
+
WordPress 3.3 and it never worked properly because the scroll position was a little
|
377 |
+
off so we are just skipping it.
|
378 |
+
*/
|
379 |
+
/*function resizeWindow(e) {
|
380 |
+
if (edcal.windowHeight != jQuery(window).height()) {
|
381 |
+
jQuery('#edcal_scrollable').css('height', edcal.getCalHeight() + 'px');
|
382 |
+
edcal.windowHeight = jQuery(window).height();
|
383 |
+
edcal.savePosition();
|
384 |
+
}
|
385 |
+
}
|
386 |
+
jQuery(window).bind('resize', resizeWindow);*/
|
387 |
+
|
388 |
+
jQuery('#newPostScheduleButton').live('click', function(evt) {
|
389 |
+
// if the button is disabled, don't do anything
|
390 |
+
if (jQuery(this).hasClass('disabled')) {
|
391 |
+
return false;
|
392 |
+
}
|
393 |
+
// Otherwise,
|
394 |
+
// make sure we can't make duplicate posts by clicking twice quickly
|
395 |
+
jQuery(this).addClass('disabled');
|
396 |
+
// and save the post
|
397 |
+
return edcal.savePost(null, false, true);
|
398 |
+
});
|
399 |
+
|
400 |
+
jQuery('#edcal-title-new-field').bind('keyup', function(evt) {
|
401 |
+
if (jQuery('#edcal-title-new-field').val().length > 0 && jQuery('#edcal-time').val().length > 0) {
|
402 |
+
jQuery('#newPostScheduleButton').removeClass('disabled');
|
403 |
+
} else {
|
404 |
+
jQuery('#newPostScheduleButton').addClass('disabled');
|
405 |
+
}
|
406 |
+
|
407 |
+
if (evt.keyCode == 13) { // enter key
|
408 |
+
/*
|
409 |
+
* If the user presses enter we want to save the draft.
|
410 |
+
*/
|
411 |
+
return edcal.savePost(null, true);
|
412 |
+
}
|
413 |
+
});
|
414 |
+
|
415 |
+
jQuery('#edcal-status').bind('change', function(evt) {
|
416 |
+
edcal.updatePublishButton();
|
417 |
+
});
|
418 |
+
|
419 |
+
jQuery('#edcal_weeks_pref').live('keyup', function(evt) {
|
420 |
+
if (jQuery('#edcal_weeks_pref').val().length > 0) {
|
421 |
+
jQuery('#edcal_applyoptions').removeClass('disabled');
|
422 |
+
} else {
|
423 |
+
jQuery('#edcal_applyoptions').addClass('disabled');
|
424 |
+
}
|
425 |
+
|
426 |
+
if (evt.keyCode == 13) { // enter key
|
427 |
+
edcal.saveOptions();
|
428 |
+
}
|
429 |
+
|
430 |
+
});
|
431 |
+
|
432 |
+
edcal.savePosition();
|
433 |
+
|
434 |
+
edcal.addOptionsSection();
|
435 |
+
|
436 |
+
jQuery('#edcal-time').timePicker({
|
437 |
+
show24Hours: edcal.timeFormat === 'H:i',
|
438 |
+
separator: ':',
|
439 |
+
step: 30
|
440 |
+
});
|
441 |
+
|
442 |
+
jQuery('#showdraftsdrawer').click(function() {
|
443 |
+
edcal.setDraftsDrawerVisible(!edcal.isDraftsDrawerVisible);
|
444 |
+
});
|
445 |
+
},
|
446 |
+
|
447 |
+
/*
|
448 |
+
* This function shows and hides the drafts drawer. Kind of clunky right now.
|
449 |
+
* Inits [loads content] only once.
|
450 |
+
*/
|
451 |
+
setDraftsDrawerVisible: function(/*boolean*/ visible, /*function*/ callback) {
|
452 |
+
var drawerwidth = '13%';
|
453 |
+
var drawerwidthmargin = '13.5%';
|
454 |
+
var showhideElement = jQuery('#showdraftsdrawer');
|
455 |
+
/* tells us if the drafts have been loaded for the first time */
|
456 |
+
if (!showhideElement.hasClass('isLoaded')) {
|
457 |
+
showhideElement.addClass('isLoaded');
|
458 |
+
edcal.setupDraftsdrawer(callback);
|
459 |
+
} else if (callback) {
|
460 |
+
/*
|
461 |
+
* If the drawer was already open we just call the callback
|
462 |
+
*/
|
463 |
+
callback();
|
464 |
+
}
|
465 |
+
|
466 |
+
if (visible) {
|
467 |
+
// edcal.output('showing draftsdrawer');
|
468 |
+
jQuery('#cal_cont').css({ 'margin-right': drawerwidthmargin });
|
469 |
+
jQuery('#draftsdrawer_cont').css({ display:'block', width:drawerwidth });
|
470 |
+
showhideElement.html(edcal.str_hidedrafts);
|
471 |
+
} else {
|
472 |
+
// edcal.output('hiding draftsdrawer');
|
473 |
+
jQuery('#cal_cont').css({ 'margin-right': '0' });
|
474 |
+
jQuery('#draftsdrawer_cont').css({ display:'none', width:'0' });
|
475 |
+
showhideElement.html(edcal.str_showdrafts);
|
476 |
+
}
|
477 |
+
|
478 |
+
edcal.isDraftsDrawerVisible = visible;
|
479 |
+
|
480 |
+
jQuery.cookie('edcal_drafts_drawer', visible, {expires: 2060});
|
481 |
+
},
|
482 |
+
|
483 |
+
/*
|
484 |
+
* Sets up the drafts drawer.
|
485 |
+
*/
|
486 |
+
setupDraftsdrawer: function(/*function*/ callback) {
|
487 |
+
jQuery('#draftsdrawer_loading').css({display:'block'});
|
488 |
+
edcal.getPosts(edcal.NO_DATE, null, function() {
|
489 |
+
edcal.initDraftsdrawer();
|
490 |
+
if (callback) {
|
491 |
+
callback();
|
492 |
+
}
|
493 |
+
});
|
494 |
+
},
|
495 |
+
|
496 |
+
/*
|
497 |
+
* Inits the drafts drawer, much like edcal.createRow()
|
498 |
+
* We could paginate this but right now we're just loading them all.
|
499 |
+
*/
|
500 |
+
initDraftsdrawer: function() {
|
501 |
+
var newrow = '';
|
502 |
+
|
503 |
+
newrow += '<a href="#" adddate="' + edcal.NO_DATE + '" class="daynewlink" style="margin-top: 5px;"' +
|
504 |
+
'title="' + edcal.str_newdraft + '" id="unscheduledNewLink" ' +
|
505 |
+
'onclick="edcal.addDraft(); return false;">' + edcal.str_addDraftLink + '</a>';
|
506 |
+
|
507 |
+
newrow += '<ul class="postlist">';
|
508 |
+
|
509 |
+
newrow += edcal.getPostItems(edcal.NO_DATE);
|
510 |
+
|
511 |
+
newrow += '</ul>';
|
512 |
+
|
513 |
+
edcal.draggablePost('#row' + edcal._wDate.toString(edcal.internalDateFormat) + ' li.post');
|
514 |
+
|
515 |
+
edcal.makeDroppable(jQuery('#draftsdrawer div.day'));
|
516 |
+
|
517 |
+
jQuery('#unscheduled').append(newrow);
|
518 |
+
jQuery('#draftsdrawer_loading').css({display:'none'});
|
519 |
+
|
520 |
+
var cal_cont = jQuery('#cal_cont');
|
521 |
+
|
522 |
+
jQuery('#unscheduled ul.postlist').css('min-height', ((cal_cont.height() - 10) -
|
523 |
+
jQuery('#draftsdrawer .draftsdrawerheadcont').height()) -
|
524 |
+
jQuery('#unscheduledNewLink').outerHeight());
|
525 |
+
|
526 |
+
jQuery('#unscheduled').mouseout(function() {
|
527 |
+
jQuery('#unscheduledNewLink').hide();
|
528 |
+
}).mouseover(function() {
|
529 |
+
jQuery('#unscheduledNewLink').show();
|
530 |
+
});
|
531 |
+
},
|
532 |
+
|
533 |
/*
|
534 |
This function aligns the grid in two directions. There
|
535 |
is a vertical grid with a row of each week and a horizontal
|
536 |
grid for each week with a list of days.
|
537 |
*/
|
538 |
alignGrid: function(/*string*/ gridid, /*int*/ cols, /*int*/ cellWidth, /*int*/ cellHeight, /*int*/ padding) {
|
539 |
+
if (jQuery(gridid).parent().attr('id')=='draftsdrawer') {
|
540 |
+
return;
|
541 |
+
}
|
542 |
+
|
543 |
var x = 0;
|
544 |
var y = 0;
|
545 |
var count = 1;
|
546 |
+
|
547 |
jQuery(gridid).each(function() {
|
548 |
jQuery(this).css('position', 'relative');
|
549 |
|
795 |
|
796 |
edcal.draggablePost('#row' + edcal._wDate.toString(edcal.internalDateFormat) + ' li.post');
|
797 |
|
798 |
+
edcal.makeDroppable(jQuery('#row' + edcal._wDate.toString(edcal.internalDateFormat) + ' > div > div.day'));
|
799 |
+
|
800 |
+
return jQuery('row' + edcal._wDate.toString(edcal.internalDateFormat));
|
801 |
+
},
|
802 |
+
|
803 |
+
/*
|
804 |
+
* Make a specific post droppable
|
805 |
+
*/
|
806 |
+
makeDroppable: function(/*jQuery*/ day) {
|
807 |
+
day.droppable({
|
808 |
hoverClass: 'day-active',
|
809 |
accept: function(ui) {
|
810 |
/*
|
827 |
greedy: true,
|
828 |
tolerance: 'pointer',
|
829 |
drop: function(event, ui) {
|
830 |
+
//edcal.output('dropped ui.draggable.attr("id"): ' + ui.draggable.attr("id"));
|
831 |
+
//edcal.output('dropped on jQuery(this).attr("id"): ' + jQuery(this).attr("id"));
|
832 |
+
//edcal.output('ui.draggable.html(): ' + ui.draggable.html());
|
833 |
+
var dayId = ui.draggable.parent().parent().parent().attr('id');
|
834 |
+
//edcal.output('dayId: ' + dayId);
|
835 |
+
edcal.doDrop(dayId, ui.draggable.attr('id'), jQuery(this).attr('id'));
|
836 |
+
}
|
|
|
837 |
});
|
|
|
|
|
838 |
},
|
839 |
|
840 |
/*
|
841 |
* Handle the drop when a user drags and drops a post.
|
842 |
*/
|
843 |
doDrop: function(/*string*/ parentId, /*string*/ postId, /*string*/ newDate, /*function*/ callback) {
|
844 |
+
//edcal.output('doDrop(' + parentId + ', ' + postId + ', ' + newDate + ')');
|
845 |
var dayId = parentId;
|
846 |
|
847 |
|
874 |
}, 500);
|
875 |
|
876 |
// Step 3. Add the item to the new DOM parent
|
877 |
+
// Step 3a. Check whether we dropped it on a day or on the Drafts Drawer
|
878 |
jQuery('#' + newDate + ' .postlist').append(edcal.createPostItem(post, newDate));
|
879 |
|
880 |
|
927 |
scrolling the calendar when that happens.
|
928 |
*/
|
929 |
handleDrag: function(event, ui) {
|
930 |
+
if (edcal.isMoving || edcal.isDragScrolling
|
931 |
+
/*
|
932 |
+
TODO: make sure that if we are on top of the drafts drawer
|
933 |
+
we don't dragScroll.
|
934 |
+
*/
|
935 |
+
) {
|
936 |
return;
|
937 |
}
|
938 |
|
991 |
* be much more adaptable to reference the class by name, but this is
|
992 |
* significantly faster. Especially on IE.
|
993 |
*/
|
994 |
+
// edcal.output('post.id: '+post.id+'\ndayobjId: '+dayobjId);
|
995 |
jQuery('#' + dayobjId + ' > div > ul').append(edcal.createPostItem(post, dayobjId));
|
996 |
},
|
997 |
|
998 |
/*
|
999 |
Makes all the posts in the specified day draggable
|
1000 |
+
and adds the edcal_quickedit.
|
1001 |
*/
|
1002 |
addPostItemDragAndToolltip: function(/*string*/ dayobjId) {
|
1003 |
edcal.draggablePost('#' + dayobjId + ' > div > ul > li');
|
1018 |
timeout: 100000,
|
1019 |
dataType: 'json',
|
1020 |
success: function(res) {
|
1021 |
+
if (res.post.date_gmt === edcal.NO_DATE) {
|
1022 |
+
edcal.removePostItem(res.post.date_gmt, 'post-' + res.post.id);
|
1023 |
+
} else {
|
1024 |
+
edcal.removePostItem(res.post.date, 'post-' + res.post.id);
|
1025 |
+
}
|
1026 |
+
|
1027 |
if (res.error) {
|
1028 |
/*
|
1029 |
* If there was an error we need to remove the dropped
|
1050 |
},
|
1051 |
|
1052 |
|
|
|
|
|
1053 |
/*
|
1054 |
* Confirms if you want to delete the specified post
|
1055 |
*/
|
1100 |
edcal.showForm(post);
|
1101 |
return false;
|
1102 |
},
|
1103 |
+
|
1104 |
+
/*
|
1105 |
+
* Called when the "Add a draft" link is clicked.
|
1106 |
+
* Sets up a post object and displays the add form
|
1107 |
+
*/
|
1108 |
+
addDraft: function() {
|
1109 |
+
jQuery('#newPostScheduleButton').addClass('disabled');
|
1110 |
+
|
1111 |
+
var post = {
|
1112 |
+
id: 0,
|
1113 |
+
date: Date.today(),
|
1114 |
+
formatteddate: edcal.NO_DATE,
|
1115 |
+
time: edcal.NO_DATE,
|
1116 |
+
status: 'draft'
|
1117 |
+
};
|
1118 |
+
edcal.showForm(post);
|
1119 |
+
return false;
|
1120 |
+
},
|
1121 |
|
1122 |
/*
|
1123 |
* Called when the Edit link for a post is clicked.
|
1177 |
} else {
|
1178 |
time = Date.parse('10:00:00'); // If we don't have a time set, default it to 10am
|
1179 |
}
|
1180 |
+
|
1181 |
+
var formattedDate;
|
1182 |
+
|
1183 |
+
if (time !== null && time !== edcal.NO_DATE) {
|
1184 |
+
var formattedtime = time.format('H:i:s');
|
1185 |
+
formattedDate = encodeURIComponent(edcal.getDayFromDayId(post.date).toString(edcal.wp_dateFormat) + ' ' + formattedtime);
|
1186 |
+
} else {
|
1187 |
+
formattedDate = encodeURIComponent(post.date.toString(edcal.wp_dateFormat + ' H:i:s'));
|
1188 |
+
}
|
1189 |
+
|
1190 |
var url = edcal.ajax_url() + '&action=edcal_savepost';
|
1191 |
var postData = 'date=' + formattedDate +
|
1192 |
'&title=' + encodeURIComponent(post.title) +
|
1193 |
'&content=' + encodeURIComponent(post.content) +
|
1194 |
'&id=' + encodeURIComponent(post.id) +
|
1195 |
'&status=' + encodeURIComponent(post.status);
|
1196 |
+
|
1197 |
+
if (time === null || time === edcal.NO_DATE) {
|
1198 |
+
postData += '&date_gmt=' + encodeURIComponent('0000-00-00 00:00:00');
|
1199 |
+
}
|
1200 |
|
1201 |
if (edcal.getUrlVars().post_type) {
|
1202 |
postData += '&post_type=' + encodeURIComponent(edcal.getUrlVars().post_type);
|
1215 |
dataType: 'json',
|
1216 |
success: function(res) {
|
1217 |
jQuery('#edit-slug-buttons').removeClass('tiploading');
|
1218 |
+
jQuery('#edcal_quickedit').hide();
|
1219 |
jQuery('#edcal_scrollable').data('scrollable').getConf().keyboard = true;
|
1220 |
if (res.error) {
|
1221 |
/*
|
1239 |
window.location = res.post.editlink.replace('&', '&');
|
1240 |
} else {
|
1241 |
|
1242 |
+
var date = res.post.date;
|
1243 |
+
|
1244 |
+
if (res.post.date_gmt === edcal.NO_DATE) {
|
1245 |
+
date = res.post.date_gmt;
|
1246 |
+
}
|
1247 |
+
|
1248 |
if (res.post.id) {
|
1249 |
+
edcal.removePostItem(date, 'post-' + res.post.id);
|
1250 |
}
|
1251 |
|
1252 |
+
edcal.addPostItem(res.post, date);
|
1253 |
+
edcal.addPostItemDragAndToolltip(date);
|
1254 |
}
|
1255 |
}
|
1256 |
|
1262 |
},
|
1263 |
error: function(xhr) {
|
1264 |
jQuery('#edit-slug-buttons').removeClass('tiploading');
|
1265 |
+
jQuery('#edcal_quickedit').hide();
|
1266 |
jQuery('#edcal_scrollable').data('scrollable').getConf().keyboard = true;
|
1267 |
edcal.showError(edcal.general_error);
|
1268 |
if (xhr.responseText) {
|
1279 |
serializePost: function() {
|
1280 |
var post = {};
|
1281 |
|
1282 |
+
jQuery('#edcal_quickedit').find('input, textarea, select').each(function() {
|
1283 |
post[this.name] = this.value;
|
1284 |
});
|
1285 |
return post;
|
1290 |
*/
|
1291 |
showForm: function(post) {
|
1292 |
edcal.resetForm();
|
1293 |
+
|
1294 |
+
if (post.formatteddate === edcal.NO_DATE || post.date_gmt === edcal.NO_DATE) {
|
1295 |
+
jQuery('#timeEditControls').hide();
|
1296 |
+
} else {
|
1297 |
+
jQuery('#timeEditControls').show();
|
1298 |
+
}
|
1299 |
|
1300 |
// show tooltip
|
1301 |
+
jQuery('#edcal_quickedit').center().show();
|
1302 |
jQuery('#edcal_scrollable').data('scrollable').getConf().keyboard = false;
|
1303 |
|
1304 |
if (!post.id) {
|
1305 |
+
if (post.formatteddate === edcal.NO_DATE) {
|
1306 |
+
jQuery('#tooltiptitle').text(edcal.str_newdraft_title);
|
1307 |
+
} else {
|
1308 |
+
jQuery('#tooltiptitle').text(edcal.str_newpost_title + post.formatteddate);
|
1309 |
+
}
|
1310 |
} else {
|
1311 |
jQuery('#tooltiptitle').text(sprintf(edcal.str_edit_post_title, post.typeTitle, edcal.getDayFromDayId(post.date).toString(edcal.previewDateFormat)));
|
1312 |
|
1358 |
|
1359 |
/*
|
1360 |
* Put the focus in the post title field when the tooltip opens.
|
1361 |
+
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1362 |
|
1363 |
+
jQuery('#edcal-title-new-field').focus();
|
1364 |
+
jQuery('#edcal-title-new-field').select();
|
|
|
|
|
|
|
|
|
|
|
1365 |
},
|
1366 |
|
1367 |
/*
|
1368 |
* Hides the add/edit form
|
1369 |
*/
|
1370 |
hideForm: function() {
|
1371 |
+
jQuery('#edcal_quickedit').hide();
|
1372 |
jQuery('#edcal_scrollable').data('scrollable').getConf().keyboard = true;
|
1373 |
edcal.resetForm();
|
1374 |
},
|
1377 |
* Clears all the input values in the add/edit form
|
1378 |
*/
|
1379 |
resetForm: function() {
|
1380 |
+
jQuery('#edcal_quickedit').find('input, textarea, select').each(function() {
|
1381 |
this.value = '';
|
1382 |
});
|
1383 |
|
1412 |
specified day.
|
1413 |
*/
|
1414 |
findPostForId: function(/*string*/ dayobjId, /*string*/ postId) {
|
1415 |
+
if (edcal.posts[dayobjId]) {
|
1416 |
for (var i = 0; i < edcal.posts[dayobjId].length; i++) {
|
1417 |
if (edcal.posts[dayobjId][i] &&
|
1418 |
'post-' + edcal.posts[dayobjId][i].id === postId) {
|
1428 |
* Removes a post from the HTML and the posts cache.
|
1429 |
*/
|
1430 |
removePostItem: function(/*string*/ dayobjId, /*string*/ postId) {
|
1431 |
+
//edcal.output('removePostItem(' + dayobjId + ', ' + postId + ')');
|
1432 |
if (edcal.findPostForId(dayobjId, postId)) {
|
1433 |
for (var i = 0; i < edcal.posts[dayobjId].length; i++) {
|
1434 |
+
if (edcal.posts[dayobjId][i] && 'post-' + edcal.posts[dayobjId][i].id === postId) {
|
1435 |
+
//edcal.output('(#' + postId+').remove() - post-'+edcal.posts[dayobjId][i].id);
|
1436 |
edcal.posts[dayobjId][i] = null;
|
1437 |
jQuery('#' + postId).remove();
|
1438 |
}
|
1463 |
specified ID.
|
1464 |
*/
|
1465 |
showActionLinks: function(/*string*/ postid) {
|
1466 |
+
if (edcal.actionTimer) {
|
1467 |
+
clearTimeout(edcal.actionTimer);
|
1468 |
+
}
|
1469 |
+
|
1470 |
+
var timeout = 250;
|
1471 |
+
|
1472 |
var post = edcal.findPostForId(jQuery('#' + postid).parent().parent().parent().attr('id'), postid);
|
1473 |
+
|
1474 |
if (edcal.inDrag || !edcal.isPostEditable(post)) {
|
1475 |
return;
|
1476 |
}
|
1477 |
+
|
1478 |
var elem = jQuery('#' + postid + ' > div.postactions');
|
1479 |
+
|
1480 |
+
if (edcal.actionLinksElem && edcal.actionLinksElem.get(0) !== elem.get(0)) {
|
1481 |
+
edcal.actionLinksElem.slideUp();
|
1482 |
+
}
|
1483 |
+
|
1484 |
+
edcal.actionLinksElem = elem;
|
1485 |
+
|
1486 |
+
edcal.actionTimer = setTimeout(function() {
|
1487 |
+
elem.slideDown();
|
1488 |
+
|
1489 |
+
|
1490 |
+
if (elem.parent().position().top + elem.parent().height() > elem.parent().parent().height()) {
|
1491 |
+
/*
|
1492 |
+
This means the action links probably won't be visible and we need to
|
1493 |
+
scroll to make sure the users can see it.
|
1494 |
+
*/
|
1495 |
+
var p = jQuery('#' + postid + ' > div.postactions').parent().parent();
|
1496 |
+
p.scrollTop(p.scrollTop() + 45);
|
1497 |
+
}
|
1498 |
+
}, timeout);
|
1499 |
},
|
1500 |
|
1501 |
/*
|
1503 |
post ID.
|
1504 |
*/
|
1505 |
hideActionLinks: function(/*string*/ postid) {
|
1506 |
+
if (edcal.actionTimer) {
|
1507 |
+
clearTimeout(edcal.actionTimer);
|
1508 |
+
}
|
1509 |
+
|
1510 |
+
edcal.actionTimer = setTimeout(function() {
|
1511 |
+
var elem = jQuery('#' + postid + ' > div.postactions');
|
1512 |
+
elem.slideUp();
|
1513 |
+
edcal.actionLinksElem = null;
|
1514 |
+
}, 125);
|
1515 |
},
|
1516 |
|
1517 |
/*
|
1585 |
if (edcal.timePref) {
|
1586 |
posttitle = '<span class="posttime">' + post.formattedtime + '</span> ' + posttitle;
|
1587 |
}
|
1588 |
+
|
1589 |
if (edcal.authorPref) {
|
1590 |
posttitle = sprintf(edcal.str_by, posttitle, '<span class="postauthor">' + post.author + '</span>');
|
1591 |
}
|
1592 |
+
|
1593 |
|
1594 |
var classString = '';
|
1595 |
|
1596 |
if (edcal.isPostMovable(post)) {
|
1597 |
return '<li onmouseover="edcal.showActionLinks(\'post-' + post.id + '\');" ' +
|
1598 |
'onmouseout="edcal.hideActionLinks(\'post-' + post.id + '\');" ' +
|
1599 |
+
'id="post-' + post.id + '" class="post ' + post.status + ' ' + edcal.getPostEditableClass(post) + '"><div class="postlink ' + classString + '">' +
|
1600 |
+
'<span>' + posttitle + '</span>' +
|
1601 |
+
'</div>' +
|
1602 |
'<div class="postactions">' +
|
1603 |
'<a href="' + post.editlink + '">' + edcal.str_edit + '</a> | ' +
|
1604 |
'<a href="#" onclick="edcal.editPost(' + post.id + '); return false;">' + edcal.str_quick_edit + '</a> | ' +
|
1605 |
'<a href="' + post.dellink + '" onclick="return edcal.confirmDelete(\'' + post.title + '\');">' + edcal.str_del + '</a> | ' +
|
1606 |
+
'<a href="' + post.permalink + '"' +
|
1607 |
+
// ' onclick="edcal.getPost('+post.id+',function(r){ edcal.output(r) }); return false;"' + // for debugging
|
1608 |
+
'>' + edcal.str_view + '</a>' +
|
1609 |
'</div></li>';
|
1610 |
} else {
|
1611 |
return '<li onmouseover="edcal.showActionLinks(\'post-' + post.id + '\');" ' +
|
1612 |
'onmouseout="edcal.hideActionLinks(\'post-' + post.id + '\');" ' +
|
1613 |
+
'id="post-' + post.id + '" class="post ' + post.status + ' ' + edcal.getPostEditableClass(post) + '"><div class="postlink ' + classString + '">' +
|
1614 |
+
'<span>' + posttitle + '</span>' +
|
1615 |
+
'</div>' +
|
1616 |
'<div class="postactions">' +
|
1617 |
'<a href="' + post.editlink + '">' + edcal.str_republish + '</a> | ' +
|
1618 |
'<a href="' + post.permalink + '">' + edcal.str_view + '</a>' +
|
1656 |
/*
|
1657 |
* If the add/edit post form is visible, don't go anywhere.
|
1658 |
*/
|
1659 |
+
if (jQuery('#edcal_quickedit').is(':visible')) {
|
1660 |
return;
|
1661 |
}
|
1662 |
|
1944 |
*/
|
1945 |
savePosition: function() {
|
1946 |
var cal = jQuery('#edcal_scrollable');
|
1947 |
+
var cal_cont = jQuery('#cal_cont');
|
1948 |
edcal.position = {
|
1949 |
top: cal.offset().top,
|
1950 |
bottom: cal.offset().top + cal.height()
|
1983 |
'height: ' + dayHeight + 'px;' +
|
1984 |
'}' +
|
1985 |
'</style>');
|
1986 |
+
|
1987 |
+
|
1988 |
+
jQuery('#draftsdrawer').css('height', cal_cont.height());
|
1989 |
+
jQuery('#draftsdrawer .day').css('min-height', (cal_cont.height() - 10) - jQuery('#draftsdrawer .draftsdrawerheadcont').height());
|
1990 |
},
|
1991 |
|
1992 |
/*
|
2044 |
|
2045 |
},
|
2046 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2047 |
/*
|
2048 |
This function updates the text of te publish button in the quick
|
2049 |
edit dialog to match the current operation.
|
2063 |
the specified post on the server.
|
2064 |
*/
|
2065 |
changeDate: function(/*string*/ newdate, /*Post*/ post, /*function*/ callback) {
|
2066 |
+
edcal.output('changeDate(' + newdate + ', ' + post + ')');
|
2067 |
+
var move_to_drawer = newdate === edcal.NO_DATE;
|
2068 |
+
var move_from_drawer = post.date_gmt === edcal.NO_DATE;
|
2069 |
+
var newdateFormatted = move_to_drawer ? '0000-00-00' : edcal.getDayFromDayId(newdate).toString(edcal.wp_dateFormat);
|
2070 |
+
// edcal.output('newdate='+newdate+'\nnewdateFormatted='+newdateFormatted);
|
2071 |
+
|
2072 |
+
var olddate = move_from_drawer ? post.date_gmt : edcal.getDayFromDayId(post.date).toString(edcal.wp_dateFormat);
|
2073 |
|
2074 |
+
|
2075 |
+
if (move_to_drawer) {
|
2076 |
+
/*
|
2077 |
+
* If the post is going into the drafts drawer then it must be a draft
|
2078 |
+
*/
|
2079 |
+
post.status = 'draft';
|
2080 |
+
}
|
2081 |
+
|
2082 |
var url = edcal.ajax_url() + '&action=edcal_changedate&postid=' + post.id +
|
2083 |
'&postStatus=' + post.status +
|
2084 |
+
'&newdate=' + newdateFormatted + '&olddate=' + olddate;
|
2085 |
|
2086 |
jQuery('#post-' + post.id).addClass('loadingclass');
|
2087 |
|
2090 |
type: 'POST',
|
2091 |
processData: false,
|
2092 |
timeout: 100000,
|
2093 |
+
// dataType: 'text',
|
2094 |
dataType: 'json',
|
2095 |
success: function(res) {
|
2096 |
+
edcal.output('res.post.date='+res.post.date);
|
2097 |
+
edcal.output(res.post);
|
2098 |
+
// console.log(res.post);
|
2099 |
if (res.error) {
|
2100 |
/*
|
2101 |
* If there was an error we need to remove the dropped
|
2111 |
}
|
2112 |
}
|
2113 |
|
2114 |
+
// edcal.output(res.post.date);
|
2115 |
+
// var container = newdateFormatted == '0000-00-00' ?
|
2116 |
+
|
2117 |
+
var removecont = move_to_drawer ? '00000000' : res.post.date;
|
2118 |
+
var addcont = move_from_drawer ? newdate : removecont;
|
2119 |
+
if ( res.post.date_gmt=='01011970' ) {
|
2120 |
+
// do somthing else
|
2121 |
+
}
|
2122 |
+
|
2123 |
+
edcal.removePostItem(removecont, 'post-' + res.post.id);
|
2124 |
+
// edcal.output('remove post from: '+removecont+', add post to: '+addcont);
|
2125 |
+
edcal.addPostItem(res.post, addcont);
|
2126 |
+
edcal.addPostItemDragAndToolltip(addcont);
|
2127 |
|
2128 |
if (callback) {
|
2129 |
callback(res);
|
2147 |
specified dates.
|
2148 |
*/
|
2149 |
getPosts: function(/*Date*/ from, /*Date*/ to, /*function*/ callback) {
|
2150 |
+
if ( !to )
|
2151 |
+
to = '';
|
2152 |
+
// edcal.output('Getting posts from ' + from + ' to ' + to);
|
2153 |
|
2154 |
var shouldGet = edcal.cacheDates[from];
|
2155 |
|
2159 |
* that we have already covered. This is cutting down on
|
2160 |
* it somewhat, but we could get much better about this.
|
2161 |
*/
|
2162 |
+
// edcal.output('Using cached results for posts from ' + from.toString('dd-MMM-yyyy') + ' to ' + to.toString('dd-MMM-yyyy'));
|
2163 |
|
2164 |
if (callback) {
|
2165 |
callback();
|
2184 |
timeout: 100000,
|
2185 |
dataType: 'text',
|
2186 |
success: function(res) {
|
2187 |
+
// edcal.output(res);
|
2188 |
jQuery('#loading').hide();
|
2189 |
/*
|
2190 |
* These result here can get pretty large on a busy blog and
|
2224 |
* case to make sure we don't get into trouble.
|
2225 |
*/
|
2226 |
post.date = post.date.replace(post.date.substring(2, 3), post.date.substring(2, 3).toUpperCase());
|
2227 |
+
if ( from=='00000000' )
|
2228 |
+
post.date = from;
|
2229 |
|
2230 |
+
// edcal.output(post.date + ', post-' + post.id);
|
2231 |
edcal.removePostItem(post.date, 'post-' + post.id);
|
2232 |
edcal.addPostItem(post, post.date);
|
2233 |
+
// edcal.output(post.id + ', ' + post.date);
|
2234 |
postDates[postDates.length] = post.date;
|
2235 |
}
|
2236 |
}
|
2246 |
* stop complaining.
|
2247 |
*/
|
2248 |
setTimeout(function() {
|
2249 |
+
// edcal.output('Finished adding draggable support to ' + postDates.length + ' posts.');
|
2250 |
jQuery.each(postDates, function(i, postDate) {
|
2251 |
edcal.addPostItemDragAndToolltip(postDate);
|
2252 |
});
|
2325 |
},
|
2326 |
|
2327 |
/*
|
2328 |
+
This function adds the screen options tab to the top of the screen. I wish
|
2329 |
WordPress had a hook so I could provide this in PHP, but as of version 2.9.1
|
2330 |
they just have an internal loop for their own screen options tabs so we're
|
2331 |
doing this in JavaScript.
|
2337 |
'id="show-edcal-settings-link" ' +
|
2338 |
'onclick="edcal.toggleOptions(); return false;" ' +
|
2339 |
'href="#" ' +
|
2340 |
+
'>' +
|
2341 |
+
edcal.str_screenoptions +
|
2342 |
+
'</a>' +
|
2343 |
'</div>';
|
2344 |
|
2345 |
if (jQuery('#screen-meta-links').length === 0) {
|
2421 |
|
2422 |
jQuery('#screen-meta').show();
|
2423 |
|
2424 |
+
jQuery('#show-edcal-settings-link').addClass('screen-meta-active');
|
2425 |
} else {
|
2426 |
jQuery('#contextual-help-wrap').slideUp('fast');
|
2427 |
|
2432 |
|
2433 |
edcal.helpMeta = null;
|
2434 |
|
2435 |
+
jQuery('#show-edcal-settings-link').removeClass('screen-meta-active');
|
2436 |
jQuery('#contextual-help-link-wrap').css('visibility', '');
|
2437 |
}
|
2438 |
},
|
2618 |
* conflict with a JavaScript library imported by
|
2619 |
* another plugin.
|
2620 |
*/
|
2621 |
+
edcal.output('Error loading calendar: ' + e);
|
2622 |
edcal.showFatalError(e.description);
|
2623 |
}
|
2624 |
+
|
2625 |
/*
|
2626 |
* The calendar supports unit tests through the QUnit framework,
|
2627 |
* but we don't want to load the extra files when we aren't running
|
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:
|
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
|
@@ -50,6 +50,7 @@ define( 'EDCAL_NONCE_ERROR', 6 );
|
|
50 |
class EdCal {
|
51 |
|
52 |
protected $supports_custom_types;
|
|
|
53 |
|
54 |
function __construct() {
|
55 |
|
@@ -68,6 +69,12 @@ class EdCal {
|
|
68 |
* installation of WordPress supports custom post types.
|
69 |
*/
|
70 |
$this->supports_custom_types = function_exists('get_post_types') && function_exists('get_post_type_object');
|
|
|
|
|
|
|
|
|
|
|
|
|
71 |
|
72 |
/*
|
73 |
* We use these variables to hold the post dates for the filter when
|
@@ -154,7 +161,6 @@ class EdCal {
|
|
154 |
update_option("edcal_count", $edcal_count);
|
155 |
}
|
156 |
|
157 |
-
|
158 |
/*
|
159 |
* This section of code embeds certain CSS and
|
160 |
* JavaScript files into the HTML. This has the
|
@@ -241,6 +247,7 @@ class EdCal {
|
|
241 |
edcal.startOfWeek = <?php echo(get_option("start_of_week")); ?>;
|
242 |
edcal.timeFormat = "<?php echo(get_option("time_format")); ?>";
|
243 |
edcal.previewDateFormat = "MMMM d";
|
|
|
244 |
|
245 |
/*
|
246 |
* We want to show the day of the first day of the week to match the user's
|
@@ -262,6 +269,7 @@ class EdCal {
|
|
262 |
edcal.str_by = <?php echo($this->edcal_json_encode(__('%1$s by %2$s', 'editorial-calendar'))) ?>;
|
263 |
|
264 |
edcal.str_addPostLink = <?php echo($this->edcal_json_encode(__('New Post', 'editorial-calendar'))) ?>;
|
|
|
265 |
edcal.ltr = <?php echo($this->edcal_json_encode(__('ltr', 'editorial-calendar'))) ?>;
|
266 |
|
267 |
edcal.str_draft = <?php echo($this->edcal_json_encode(__(' [DRAFT]', 'editorial-calendar'))) ?>;
|
@@ -279,7 +287,9 @@ class EdCal {
|
|
279 |
edcal.str_posttitle = <?php echo($this->edcal_json_encode(__('Title', 'editorial-calendar'))) ?>;
|
280 |
edcal.str_postcontent = <?php echo($this->edcal_json_encode(__('Content', 'editorial-calendar'))) ?>;
|
281 |
edcal.str_newpost = <?php echo($this->edcal_json_encode(__('Add a new post on %s', 'editorial-calendar'))) ?>;
|
|
|
282 |
edcal.str_newpost_title = <?php echo($this->edcal_json_encode(sprintf(__('New %s - ', 'editorial-calendar'), $this->edcal_get_posttype_singlename()))) ?> ;
|
|
|
283 |
edcal.str_update = <?php echo($this->edcal_json_encode(__('Update', 'editorial-calendar'))) ?>;
|
284 |
edcal.str_publish = <?php echo($this->edcal_json_encode(__('Schedule', 'editorial-calendar'))) ?>;
|
285 |
edcal.str_review = <?php echo($this->edcal_json_encode(__('Submit for Review', 'editorial-calendar'))) ?>;
|
@@ -309,6 +319,9 @@ class EdCal {
|
|
309 |
|
310 |
edcal.str_weekserror = <?php echo($this->edcal_json_encode(__('The calendar can only show between 1 and 5 weeks at a time.', 'editorial-calendar'))) ?>;
|
311 |
edcal.str_weekstt = <?php echo($this->edcal_json_encode(__('Select the number of weeks for the calendar to show.', 'editorial-calendar'))) ?>;
|
|
|
|
|
|
|
312 |
|
313 |
edcal.str_feedbackmsg = <?php echo($this->edcal_json_encode(__('<div id="feedbacksection">' .
|
314 |
'<h2>Help us Make the Editorial Calendar Better</h2>' .
|
@@ -357,23 +370,35 @@ class EdCal {
|
|
357 |
|
358 |
<div class="wrap">
|
359 |
<div class="icon32" id="icon-edit"><br/></div>
|
360 |
-
<h2 id="edcal_main_title"><?php echo(
|
361 |
|
362 |
<div id="loadingcont">
|
363 |
<div id="loading"> </div>
|
364 |
</div>
|
365 |
|
366 |
-
<div id="topbar" class="tablenav">
|
367 |
-
<div id="topleft" class="tablenav-pages">
|
368 |
<h3>
|
369 |
<a href="#" title="<?php echo(__('Jump back', 'editorial-calendar')) ?>" class="prev page-numbers" id="prevmonth">«</a>
|
370 |
<span id="currentRange"></span>
|
371 |
<a href="#" title="<?php echo(__('Skip ahead', 'editorial-calendar')) ?>" class="next page-numbers" id="nextmonth">»</a>
|
|
|
|
|
372 |
</h3>
|
373 |
</div>
|
374 |
-
|
375 |
-
<div id="topright">
|
376 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
377 |
</div>
|
378 |
</div>
|
379 |
|
@@ -382,7 +407,7 @@ class EdCal {
|
|
382 |
<div id="cal"></div>
|
383 |
</div>
|
384 |
</div>
|
385 |
-
|
386 |
<?php $this->edcal_edit_popup(); ?>
|
387 |
|
388 |
</div><?php // end .wrap ?>
|
@@ -397,13 +422,13 @@ class EdCal {
|
|
397 |
function edcal_edit_popup() {
|
398 |
|
399 |
?>
|
400 |
-
<div id="
|
401 |
<div id="tooltiphead">
|
402 |
<h3 id="tooltiptitle"><?php _e('Edit Post', 'editorial-calendar') ?></h3>
|
403 |
<a href="#" id="tipclose" onclick="edcal.hideForm(); return false;" title="close"> </a>
|
404 |
</div>
|
405 |
|
406 |
-
<div class="
|
407 |
|
408 |
<fieldset>
|
409 |
|
@@ -417,24 +442,25 @@ class EdCal {
|
|
417 |
<span class="input-text-wrap"><textarea cols="15" rows="7" id="content" name="content"></textarea></span>
|
418 |
</label>
|
419 |
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
|
|
|
438 |
|
439 |
<?php /* <label>
|
440 |
<span class="title"><?php _e('Author', 'editorial-calendar') ?></span>
|
@@ -458,11 +484,15 @@ class EdCal {
|
|
458 |
/*
|
459 |
* When we get a set of posts to populate the calendar we don't want
|
460 |
* to get all of the posts. This filter allows us to specify the dates
|
461 |
-
* we want.
|
462 |
*/
|
463 |
function edcal_filter_where($where = '') {
|
464 |
global $edcal_startDate, $edcal_endDate;
|
465 |
-
|
|
|
|
|
|
|
|
|
466 |
return $where;
|
467 |
}
|
468 |
|
@@ -519,15 +549,15 @@ class EdCal {
|
|
519 |
|
520 |
global $edcal_startDate, $edcal_endDate;
|
521 |
|
522 |
-
$edcal_startDate = isset($_GET['from'])
|
523 |
-
$edcal_endDate = isset($_GET['to'])
|
524 |
global $post;
|
525 |
$args = array(
|
526 |
'posts_per_page' => -1,
|
527 |
'post_status' => "publish&future&draft",
|
528 |
'post_parent' => null // any parent
|
529 |
);
|
530 |
-
|
531 |
/*
|
532 |
* If we're in the specific post type case we need to add
|
533 |
* the post type to our query.
|
@@ -536,11 +566,24 @@ class EdCal {
|
|
536 |
if ($post_type) {
|
537 |
$args['post_type'] = $post_type;
|
538 |
}
|
539 |
-
|
540 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
541 |
$myposts = query_posts($args);
|
542 |
-
remove_filter('posts_where', array(&$this, 'edcal_filter_where'));
|
543 |
-
|
544 |
?>[
|
545 |
<?php
|
546 |
$size = sizeof($myposts);
|
@@ -661,17 +704,17 @@ class EdCal {
|
|
661 |
$timeFormat = "ga";
|
662 |
} else if ($timeFormat == "g:i A") {
|
663 |
$timeFormat = "gA";
|
664 |
-
} else if ($timeFormat == "H:i"
|
665 |
$timeFormat = "H";
|
666 |
}
|
667 |
|
668 |
setup_postdata($post);
|
669 |
|
670 |
-
if (get_post_status() == 'auto-draft' ||
|
671 |
-
get_post_status() == 'inherit') {
|
672 |
/*
|
673 |
* WordPress 3 added a new post status of auto-draft so
|
674 |
-
* we want to hide them from the calendar
|
|
|
675 |
*/
|
676 |
return;
|
677 |
}
|
@@ -690,28 +733,34 @@ class EdCal {
|
|
690 |
} else {
|
691 |
$postTypeTitle = 'post';
|
692 |
}
|
|
|
|
|
|
|
|
|
|
|
693 |
?>
|
694 |
{
|
695 |
"date" : "<?php the_time('d') ?><?php the_time('m') ?><?php the_time('Y') ?>",
|
696 |
-
"
|
697 |
-
"
|
698 |
-
"
|
699 |
-
"
|
700 |
-
"
|
701 |
-
"
|
702 |
-
"
|
703 |
-
"
|
704 |
-
"
|
|
|
705 |
|
706 |
<?php if ( current_user_can('edit_post', $post->ID) ) {?>
|
707 |
-
"editlink" : "<?php echo
|
708 |
<?php } ?>
|
709 |
|
710 |
<?php if ( current_user_can('delete_post', $post->ID) ) {?>
|
711 |
"dellink" : "javascript:edcal.deletePost(<?php echo $post->ID ?>)",
|
712 |
<?php } ?>
|
713 |
|
714 |
-
"permalink" : "<?php echo
|
715 |
"id" : "<?php the_ID(); ?>"
|
716 |
|
717 |
<?php if($fullPost) : ?>
|
@@ -729,7 +778,7 @@ class EdCal {
|
|
729 |
* This is a helper AJAX function to delete a post. It gets called
|
730 |
* when a user clicks the delete button, and allows the user to
|
731 |
* retain their position within the calendar without a page refresh.
|
732 |
-
* It is not called unless the user has permission to delete the post
|
733 |
*/
|
734 |
function edcal_deletepost() {
|
735 |
if (!$this->edcal_checknonce()) {
|
@@ -743,7 +792,11 @@ class EdCal {
|
|
743 |
$post = get_post($edcal_postid, ARRAY_A);
|
744 |
$title = $post['post_title'];
|
745 |
$date = date('dmY', strtotime($post['post_date'])); // [TODO] : is there a better way to generate the date string ... ??
|
746 |
-
|
|
|
|
|
|
|
|
|
747 |
$force = !EMPTY_TRASH_DAYS; // wordpress 2.9 thing. deleted post hangs around (ie in a recycle bin) after deleted for this # of days
|
748 |
if ( $post->post_type == 'attachment' ) {
|
749 |
$force = ( $force || !MEDIA_TRASH );
|
@@ -761,7 +814,8 @@ class EdCal {
|
|
761 |
{
|
762 |
"date" : "<?php echo $date ?>",
|
763 |
"title" : "<?php echo $title ?>",
|
764 |
-
"id" : "<?php echo $edcal_postid ?>"
|
|
|
765 |
}
|
766 |
}
|
767 |
<?php
|
@@ -867,7 +921,7 @@ class EdCal {
|
|
867 |
|
868 |
/*
|
869 |
* This is a helper function to create a new draft post on a specified date
|
870 |
-
* or update an existing post
|
871 |
*/
|
872 |
function edcal_savepost() {
|
873 |
|
@@ -879,6 +933,7 @@ class EdCal {
|
|
879 |
$this->edcal_addNoCacheHeaders();
|
880 |
|
881 |
$edcal_date = isset($_POST["date"])?$_POST["date"]:null;
|
|
|
882 |
|
883 |
$my_post = array();
|
884 |
|
@@ -893,9 +948,9 @@ class EdCal {
|
|
893 |
$my_post['post_content'] = isset($_POST["content"])?$_POST["content"]:null;
|
894 |
|
895 |
$my_post['post_date'] = $edcal_date;
|
896 |
-
$my_post['post_date_gmt'] =
|
897 |
$my_post['post_modified'] = $edcal_date;
|
898 |
-
$my_post['post_modified_gmt'] =
|
899 |
|
900 |
/*
|
901 |
* When we create a new post we need to specify the post type
|
@@ -993,58 +1048,68 @@ class EdCal {
|
|
993 |
$edcal_newDate = isset($_GET['newdate'])?$_GET['newdate']:null;
|
994 |
$edcal_oldDate = isset($_GET['olddate'])?$_GET['olddate']:null;
|
995 |
$edcal_postStatus = isset($_GET['postStatus'])?$_GET['postStatus']:null;
|
996 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
997 |
if (!current_user_can('edit_post', $edcal_postid)) {
|
998 |
/*
|
999 |
* This is just a sanity check to make sure that the current
|
1000 |
* user has permission to edit posts. Most of the time this
|
1001 |
* will never be run because you can't see the calendar unless
|
1002 |
-
* you are at least an editor
|
1003 |
*/
|
1004 |
-
|
1005 |
-
|
1006 |
-
|
1007 |
-
|
1008 |
-
|
1009 |
-
|
1010 |
-
|
1011 |
-
|
1012 |
-
|
1013 |
-
|
1014 |
-
$
|
1015 |
-
?>
|
1016 |
-
"post" :
|
1017 |
-
<?php
|
1018 |
-
$this->edcal_postJSON($post, false, true);
|
1019 |
-
?> }
|
1020 |
-
|
1021 |
-
<?php
|
1022 |
-
die();
|
1023 |
}
|
1024 |
-
|
1025 |
-
|
1026 |
-
|
1027 |
-
|
1028 |
-
/*
|
1029 |
-
* We are doing optimistic concurrency checking on the dates. If
|
1030 |
-
* the user tries to move a post we want to make sure nobody else
|
1031 |
-
* has moved that post since the page was last updated. If the
|
1032 |
-
* old date in the database doesn't match the old date from the
|
1033 |
-
* browser then we return an error to the browser along with the
|
1034 |
-
* updated post data.
|
1035 |
-
*/
|
1036 |
-
if (date('Y-m-d', strtotime($post['post_date'])) != date('Y-m-d', strtotime($edcal_oldDate))) {
|
1037 |
-
?> {
|
1038 |
-
"error": <?php echo(EDCAL_CONCURRENCY_ERROR); ?>,
|
1039 |
-
<?php
|
1040 |
-
|
1041 |
-
global $post;
|
1042 |
-
$args = array(
|
1043 |
-
'posts_id' => $edcal_postid,
|
1044 |
-
);
|
1045 |
-
|
1046 |
-
$post = get_post($edcal_postid);
|
1047 |
?>
|
|
|
|
|
1048 |
"post" :
|
1049 |
<?php
|
1050 |
$this->edcal_postJSON($post, false, true);
|
@@ -1053,14 +1118,19 @@ class EdCal {
|
|
1053 |
<?php
|
1054 |
die();
|
1055 |
}
|
1056 |
-
|
|
|
1057 |
/*
|
1058 |
-
*
|
1059 |
-
* the date in the local time zone, the modified date in GMT and the
|
1060 |
-
* modified date in the local time zone. We update all of them.
|
1061 |
*/
|
1062 |
-
$post['post_date_gmt'] = $post['post_date'];
|
1063 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1064 |
/*
|
1065 |
* When a user creates a draft and never sets a date or publishes it
|
1066 |
* then the GMT date will have a timestamp of 00:00:00 to indicate
|
@@ -1068,28 +1138,36 @@ class EdCal {
|
|
1068 |
* an edit date or the wp_update_post function will strip our new
|
1069 |
* date out and leave the post as publish immediately.
|
1070 |
*/
|
1071 |
-
$needsEditDate =
|
1072 |
-
|
1073 |
-
|
1074 |
-
|
1075 |
-
|
1076 |
-
if ($needsEditDate != -1) {
|
1077 |
-
$updated_post['edit_date'] = $edcal_newDate . substr($post['post_date'], strlen($edcal_newDate));
|
1078 |
}
|
1079 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1080 |
/*
|
1081 |
* We need to make sure to use the GMT formatting for the date.
|
1082 |
*/
|
1083 |
-
|
1084 |
-
|
1085 |
-
|
|
|
|
|
1086 |
|
1087 |
-
if ($edcal_postStatus != $post
|
1088 |
/*
|
1089 |
* We only want to update the post status if it has changed.
|
1090 |
* If the post status has changed that takes a few more steps
|
1091 |
*/
|
1092 |
-
wp_transition_post_status($edcal_postStatus, $post
|
1093 |
$updated_post['post_status'] = $edcal_postStatus;
|
1094 |
|
1095 |
// Update counts for the post's terms.
|
@@ -1103,6 +1181,7 @@ class EdCal {
|
|
1103 |
do_action('wp_insert_post', $edcal_postid, $post);
|
1104 |
}
|
1105 |
|
|
|
1106 |
/*
|
1107 |
* Now we finally update the post into the database
|
1108 |
*/
|
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: 2.0
|
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
|
50 |
class EdCal {
|
51 |
|
52 |
protected $supports_custom_types;
|
53 |
+
protected $default_time;
|
54 |
|
55 |
function __construct() {
|
56 |
|
69 |
* installation of WordPress supports custom post types.
|
70 |
*/
|
71 |
$this->supports_custom_types = function_exists('get_post_types') && function_exists('get_post_type_object');
|
72 |
+
|
73 |
+
/*
|
74 |
+
* This is the default time that posts get created at, for now
|
75 |
+
* we are using 10am, but this could become an option later.
|
76 |
+
*/
|
77 |
+
$this->default_time = get_option("edcal_default_time") != "" ? get_option("edcal_default_time") : '10:00';
|
78 |
|
79 |
/*
|
80 |
* We use these variables to hold the post dates for the filter when
|
161 |
update_option("edcal_count", $edcal_count);
|
162 |
}
|
163 |
|
|
|
164 |
/*
|
165 |
* This section of code embeds certain CSS and
|
166 |
* JavaScript files into the HTML. This has the
|
247 |
edcal.startOfWeek = <?php echo(get_option("start_of_week")); ?>;
|
248 |
edcal.timeFormat = "<?php echo(get_option("time_format")); ?>";
|
249 |
edcal.previewDateFormat = "MMMM d";
|
250 |
+
edcal.defaultTime = "<?php echo $this->default_time; ?>";
|
251 |
|
252 |
/*
|
253 |
* We want to show the day of the first day of the week to match the user's
|
269 |
edcal.str_by = <?php echo($this->edcal_json_encode(__('%1$s by %2$s', 'editorial-calendar'))) ?>;
|
270 |
|
271 |
edcal.str_addPostLink = <?php echo($this->edcal_json_encode(__('New Post', 'editorial-calendar'))) ?>;
|
272 |
+
edcal.str_addDraftLink = <?php echo($this->edcal_json_encode(__('New Draft', 'editorial-calendar'))) ?>;
|
273 |
edcal.ltr = <?php echo($this->edcal_json_encode(__('ltr', 'editorial-calendar'))) ?>;
|
274 |
|
275 |
edcal.str_draft = <?php echo($this->edcal_json_encode(__(' [DRAFT]', 'editorial-calendar'))) ?>;
|
287 |
edcal.str_posttitle = <?php echo($this->edcal_json_encode(__('Title', 'editorial-calendar'))) ?>;
|
288 |
edcal.str_postcontent = <?php echo($this->edcal_json_encode(__('Content', 'editorial-calendar'))) ?>;
|
289 |
edcal.str_newpost = <?php echo($this->edcal_json_encode(__('Add a new post on %s', 'editorial-calendar'))) ?>;
|
290 |
+
edcal.str_newdraft = <?php echo($this->edcal_json_encode(__('Add a new draft', 'editorial-calendar'))) ?>;
|
291 |
edcal.str_newpost_title = <?php echo($this->edcal_json_encode(sprintf(__('New %s - ', 'editorial-calendar'), $this->edcal_get_posttype_singlename()))) ?> ;
|
292 |
+
edcal.str_newdraft_title = <?php echo($this->edcal_json_encode(__('New Draft', 'editorial-calendar'))) ?>;
|
293 |
edcal.str_update = <?php echo($this->edcal_json_encode(__('Update', 'editorial-calendar'))) ?>;
|
294 |
edcal.str_publish = <?php echo($this->edcal_json_encode(__('Schedule', 'editorial-calendar'))) ?>;
|
295 |
edcal.str_review = <?php echo($this->edcal_json_encode(__('Submit for Review', 'editorial-calendar'))) ?>;
|
319 |
|
320 |
edcal.str_weekserror = <?php echo($this->edcal_json_encode(__('The calendar can only show between 1 and 5 weeks at a time.', 'editorial-calendar'))) ?>;
|
321 |
edcal.str_weekstt = <?php echo($this->edcal_json_encode(__('Select the number of weeks for the calendar to show.', 'editorial-calendar'))) ?>;
|
322 |
+
|
323 |
+
edcal.str_showdrafts = <?php echo($this->edcal_json_encode(__('Show Unscheduled Drafts'))) ?>;
|
324 |
+
edcal.str_hidedrafts = <?php echo($this->edcal_json_encode(__('Hide Unscheduled Drafts'))) ?>;
|
325 |
|
326 |
edcal.str_feedbackmsg = <?php echo($this->edcal_json_encode(__('<div id="feedbacksection">' .
|
327 |
'<h2>Help us Make the Editorial Calendar Better</h2>' .
|
370 |
|
371 |
<div class="wrap">
|
372 |
<div class="icon32" id="icon-edit"><br/></div>
|
373 |
+
<h2 id="edcal_main_title"><?php echo sprintf( __('%1$s Calendar', 'editorial-calendar'), $this->edcal_get_posttype_multiplename() ) ?></h2>
|
374 |
|
375 |
<div id="loadingcont">
|
376 |
<div id="loading"> </div>
|
377 |
</div>
|
378 |
|
379 |
+
<div id="topbar" class="tablenav clearfix">
|
380 |
+
<div id="topleft" class="tablenav-pages alignleft">
|
381 |
<h3>
|
382 |
<a href="#" title="<?php echo(__('Jump back', 'editorial-calendar')) ?>" class="prev page-numbers" id="prevmonth">«</a>
|
383 |
<span id="currentRange"></span>
|
384 |
<a href="#" title="<?php echo(__('Skip ahead', 'editorial-calendar')) ?>" class="next page-numbers" id="nextmonth">»</a>
|
385 |
+
|
386 |
+
<a class="save button" title="<?php echo(__('Scroll the calendar and make the today visible', 'editorial-calendar')) ?>" id="moveToToday"><?php echo(__('Show Today', 'editorial-calendar')) ?></a>
|
387 |
</h3>
|
388 |
</div>
|
389 |
+
|
390 |
+
<div id="topright" class="tablenav-pages alignright">
|
391 |
+
<a class="save button" title="<?php echo(__('Show unscheduled posts', 'editorial-calendar')) ?>" id="showdraftsdrawer"><?php echo(__('Show Drafts', 'editorial-calendar')) ?></a>
|
392 |
+
</div>
|
393 |
+
</div>
|
394 |
+
|
395 |
+
<div id="draftsdrawer_cont">
|
396 |
+
<div id="draftsdrawer">
|
397 |
+
<div class="draftsdrawerheadcont" title="<?php echo(__('Unscheduled draft posts', 'editorial-calendar')) ?>"><div class="dayhead"><?php echo(__('Unscheduled', 'editorial-calendar')) ?></div></div>
|
398 |
+
<div class="day" id="00000000">
|
399 |
+
<div id="draftsdrawer_loading"></div>
|
400 |
+
<div id="unscheduled" class="dayobj"></div>
|
401 |
+
</div>
|
402 |
</div>
|
403 |
</div>
|
404 |
|
407 |
<div id="cal"></div>
|
408 |
</div>
|
409 |
</div>
|
410 |
+
|
411 |
<?php $this->edcal_edit_popup(); ?>
|
412 |
|
413 |
</div><?php // end .wrap ?>
|
422 |
function edcal_edit_popup() {
|
423 |
|
424 |
?>
|
425 |
+
<div id="edcal_quickedit" style="display:none;">
|
426 |
<div id="tooltiphead">
|
427 |
<h3 id="tooltiptitle"><?php _e('Edit Post', 'editorial-calendar') ?></h3>
|
428 |
<a href="#" id="tipclose" onclick="edcal.hideForm(); return false;" title="close"> </a>
|
429 |
</div>
|
430 |
|
431 |
+
<div class="edcal_quickedit inline-edit-row">
|
432 |
|
433 |
<fieldset>
|
434 |
|
442 |
<span class="input-text-wrap"><textarea cols="15" rows="7" id="content" name="content"></textarea></span>
|
443 |
</label>
|
444 |
|
445 |
+
<div id="timeEditControls">
|
446 |
+
<label>
|
447 |
+
<span class="title"><?php _e('Time', 'editorial-calendar') ?></span>
|
448 |
+
<span class="input-text-wrap"><input type="text" class="ptitle" id="edcal-time" name="time" value="" size="8" maxlength="8" autocomplete="off" /></span>
|
449 |
+
</label>
|
450 |
+
|
451 |
+
<label>
|
452 |
+
<span class="title"><?php _e('Status', 'editorial-calendar') ?></span>
|
453 |
+
<span class="input-text-wrap">
|
454 |
+
<select name="status" id="edcal-status">
|
455 |
+
<option value="draft"><?php _e('Draft', 'editorial-calendar') ?></option>
|
456 |
+
<option value="pending"><?php _e('Pending Review', 'editorial-calendar') ?></option>
|
457 |
+
<?php if ( current_user_can('publish_posts') ) {?>
|
458 |
+
<option id="futureoption" value="future"><?php _e('Scheduled', 'editorial-calendar') ?></option>
|
459 |
+
<?php } ?>
|
460 |
+
</select>
|
461 |
+
</span>
|
462 |
+
</label>
|
463 |
+
</div>
|
464 |
|
465 |
<?php /* <label>
|
466 |
<span class="title"><?php _e('Author', 'editorial-calendar') ?></span>
|
484 |
/*
|
485 |
* When we get a set of posts to populate the calendar we don't want
|
486 |
* to get all of the posts. This filter allows us to specify the dates
|
487 |
+
* we want. We also exclude posts that have not been set to a specific date.
|
488 |
*/
|
489 |
function edcal_filter_where($where = '') {
|
490 |
global $edcal_startDate, $edcal_endDate;
|
491 |
+
if ($edcal_startDate == '00000000') {
|
492 |
+
$where .= " AND post_date_gmt LIKE '0000%'";
|
493 |
+
} else {
|
494 |
+
$where .= " AND post_date >= '" . $edcal_startDate . "' AND post_date < '" . $edcal_endDate . "' AND post_date_gmt NOT LIKE '0000%'";
|
495 |
+
}
|
496 |
return $where;
|
497 |
}
|
498 |
|
549 |
|
550 |
global $edcal_startDate, $edcal_endDate;
|
551 |
|
552 |
+
$edcal_startDate = isset($_GET['from']) ? $_GET['from'] : null;
|
553 |
+
$edcal_endDate = isset($_GET['to']) ? $_GET['to'] : null;
|
554 |
global $post;
|
555 |
$args = array(
|
556 |
'posts_per_page' => -1,
|
557 |
'post_status' => "publish&future&draft",
|
558 |
'post_parent' => null // any parent
|
559 |
);
|
560 |
+
|
561 |
/*
|
562 |
* If we're in the specific post type case we need to add
|
563 |
* the post type to our query.
|
566 |
if ($post_type) {
|
567 |
$args['post_type'] = $post_type;
|
568 |
}
|
569 |
+
|
570 |
+
/*
|
571 |
+
* If we're getting the list of posts for the drafts drawer we
|
572 |
+
* want to sort them by the post title.
|
573 |
+
*/
|
574 |
+
if ($edcal_startDate == '00000000') {
|
575 |
+
$args['orderby'] = 'title';
|
576 |
+
}
|
577 |
+
|
578 |
+
/*
|
579 |
+
* We add a WHERE clause to filter by calendar date and/or by whether
|
580 |
+
* or not the posts have been scheduled to a specific date:
|
581 |
+
* WHERE `post_date_gmt` = '0000-00-00 00:00:00'
|
582 |
+
*/
|
583 |
+
add_filter( 'posts_where', array(&$this, 'edcal_filter_where' ));
|
584 |
$myposts = query_posts($args);
|
585 |
+
remove_filter( 'posts_where', array(&$this, 'edcal_filter_where' ));
|
586 |
+
|
587 |
?>[
|
588 |
<?php
|
589 |
$size = sizeof($myposts);
|
704 |
$timeFormat = "ga";
|
705 |
} else if ($timeFormat == "g:i A") {
|
706 |
$timeFormat = "gA";
|
707 |
+
} else if ($timeFormat == "H:i") {
|
708 |
$timeFormat = "H";
|
709 |
}
|
710 |
|
711 |
setup_postdata($post);
|
712 |
|
713 |
+
if (get_post_status() == 'auto-draft' || get_post_status() == 'inherit' || get_post_status() == 'trash' ) {
|
|
|
714 |
/*
|
715 |
* WordPress 3 added a new post status of auto-draft so
|
716 |
+
* we want to hide them from the calendar.
|
717 |
+
* We also want to hide posts with type 'inherit'
|
718 |
*/
|
719 |
return;
|
720 |
}
|
733 |
} else {
|
734 |
$postTypeTitle = 'post';
|
735 |
}
|
736 |
+
|
737 |
+
$post_date_gmt = date('dmY',strtotime($post->post_date_gmt));
|
738 |
+
if ($post_date_gmt == '01011970') {
|
739 |
+
$post_date_gmt = '00000000';
|
740 |
+
}
|
741 |
?>
|
742 |
{
|
743 |
"date" : "<?php the_time('d') ?><?php the_time('m') ?><?php the_time('Y') ?>",
|
744 |
+
"date_gmt" : "<?php echo $post_date_gmt; ?>",
|
745 |
+
"time" : "<?php echo trim(get_the_time()) ?>",
|
746 |
+
"formattedtime" : "<?php $this->edcal_json_encode(the_time($timeFormat)) ?>",
|
747 |
+
"sticky" : "<?php echo is_sticky($post->ID) ?>",
|
748 |
+
"url" : "<?php $this->edcal_json_encode(the_permalink()) ?>",
|
749 |
+
"status" : "<?php echo get_post_status() ?>",
|
750 |
+
"title" : <?php echo $this->edcal_json_encode(get_the_title()) ?>,
|
751 |
+
"author" : <?php echo $this->edcal_json_encode(get_the_author()) ?>,
|
752 |
+
"type" : "<?php echo get_post_type( $post ) ?>",
|
753 |
+
"typeTitle" : "<?php echo $postTypeTitle ?>",
|
754 |
|
755 |
<?php if ( current_user_can('edit_post', $post->ID) ) {?>
|
756 |
+
"editlink" : "<?php echo get_edit_post_link($id) ?>",
|
757 |
<?php } ?>
|
758 |
|
759 |
<?php if ( current_user_can('delete_post', $post->ID) ) {?>
|
760 |
"dellink" : "javascript:edcal.deletePost(<?php echo $post->ID ?>)",
|
761 |
<?php } ?>
|
762 |
|
763 |
+
"permalink" : "<?php echo get_permalink($id) ?>",
|
764 |
"id" : "<?php the_ID(); ?>"
|
765 |
|
766 |
<?php if($fullPost) : ?>
|
778 |
* This is a helper AJAX function to delete a post. It gets called
|
779 |
* when a user clicks the delete button, and allows the user to
|
780 |
* retain their position within the calendar without a page refresh.
|
781 |
+
* It is not called unless the user has permission to delete the post.
|
782 |
*/
|
783 |
function edcal_deletepost() {
|
784 |
if (!$this->edcal_checknonce()) {
|
792 |
$post = get_post($edcal_postid, ARRAY_A);
|
793 |
$title = $post['post_title'];
|
794 |
$date = date('dmY', strtotime($post['post_date'])); // [TODO] : is there a better way to generate the date string ... ??
|
795 |
+
$date_gmt = date('dmY',strtotime($post['post_date_gmt']));
|
796 |
+
if ($date_gmt == '01011970') {
|
797 |
+
$date_gmt = '00000000';
|
798 |
+
}
|
799 |
+
|
800 |
$force = !EMPTY_TRASH_DAYS; // wordpress 2.9 thing. deleted post hangs around (ie in a recycle bin) after deleted for this # of days
|
801 |
if ( $post->post_type == 'attachment' ) {
|
802 |
$force = ( $force || !MEDIA_TRASH );
|
814 |
{
|
815 |
"date" : "<?php echo $date ?>",
|
816 |
"title" : "<?php echo $title ?>",
|
817 |
+
"id" : "<?php echo $edcal_postid ?>",
|
818 |
+
"date_gmt" : "<?php echo $date_gmt; ?>"
|
819 |
}
|
820 |
}
|
821 |
<?php
|
921 |
|
922 |
/*
|
923 |
* This is a helper function to create a new draft post on a specified date
|
924 |
+
* or update an existing post.
|
925 |
*/
|
926 |
function edcal_savepost() {
|
927 |
|
933 |
$this->edcal_addNoCacheHeaders();
|
934 |
|
935 |
$edcal_date = isset($_POST["date"])?$_POST["date"]:null;
|
936 |
+
$edcal_date_gmt = isset($_POST["date_gmt"])?$_POST["date_gmt"]:get_gmt_from_date($edcal_date);
|
937 |
|
938 |
$my_post = array();
|
939 |
|
948 |
$my_post['post_content'] = isset($_POST["content"])?$_POST["content"]:null;
|
949 |
|
950 |
$my_post['post_date'] = $edcal_date;
|
951 |
+
$my_post['post_date_gmt'] = $edcal_date_gmt;
|
952 |
$my_post['post_modified'] = $edcal_date;
|
953 |
+
$my_post['post_modified_gmt'] = $edcal_date_gmt;
|
954 |
|
955 |
/*
|
956 |
* When we create a new post we need to specify the post type
|
1048 |
$edcal_newDate = isset($_GET['newdate'])?$_GET['newdate']:null;
|
1049 |
$edcal_oldDate = isset($_GET['olddate'])?$_GET['olddate']:null;
|
1050 |
$edcal_postStatus = isset($_GET['postStatus'])?$_GET['postStatus']:null;
|
1051 |
+
$move_to_drawer = $edcal_newDate == '0000-00-00';
|
1052 |
+
$move_from_drawer = $edcal_oldDate == '00000000';
|
1053 |
+
|
1054 |
+
global $post;
|
1055 |
+
$args = array(
|
1056 |
+
'posts_id' => $edcal_postid,
|
1057 |
+
);
|
1058 |
+
$post = get_post($edcal_postid);
|
1059 |
+
setup_postdata($post);
|
1060 |
+
|
1061 |
+
/*
|
1062 |
+
* Posts in WordPress have more than one date. There is the GMT date,
|
1063 |
+
* the date in the local time zone, the modified date in GMT and the
|
1064 |
+
* modified date in the local time zone. We update all of them.
|
1065 |
+
*/
|
1066 |
+
if ( $move_from_drawer ) {
|
1067 |
+
/*
|
1068 |
+
* Set the date to 'unscheduled' [ie. 0]. We use this date
|
1069 |
+
* further down in the concurrency check, and this will make the dates
|
1070 |
+
* technically off by 10 hours, but it's still the same day. We only do
|
1071 |
+
* this for posts that were created as drafts. Works for now, but
|
1072 |
+
* we would have to revamp this if we use an actual timestamp check.
|
1073 |
+
*/
|
1074 |
+
$post->post_date = '0000-00-00 ' . date('H:i:s', strtotime($post->post_date));
|
1075 |
+
} else if ( $move_to_drawer ) {
|
1076 |
+
// echo ( "\r\npost->post_date_gmt=".$post->post_date_gmt);
|
1077 |
+
$post->post_date_gmt = $post->post_date;
|
1078 |
+
} else {
|
1079 |
+
// set the scheduled time as our original time
|
1080 |
+
$post->post_date_gmt = $post->post_date;
|
1081 |
+
}
|
1082 |
+
// echo ( "\r\npost->post_date_gmt = $post->post_date_gmt \r\npost->post_date = $post->post_date");
|
1083 |
+
|
1084 |
+
/*
|
1085 |
+
* Error-checking:
|
1086 |
+
*/
|
1087 |
+
$error = false;
|
1088 |
if (!current_user_can('edit_post', $edcal_postid)) {
|
1089 |
/*
|
1090 |
* This is just a sanity check to make sure that the current
|
1091 |
* user has permission to edit posts. Most of the time this
|
1092 |
* will never be run because you can't see the calendar unless
|
1093 |
+
* you are at least an editor.
|
1094 |
*/
|
1095 |
+
$error = EDCAL_PERMISSION_ERROR;
|
1096 |
+
} else if ( date('Y-m-d', strtotime($post->post_date)) != date('Y-m-d', strtotime($edcal_oldDate)) ) {
|
1097 |
+
/*
|
1098 |
+
* We are doing optimistic concurrency checking on the dates. If
|
1099 |
+
* the user tries to move a post we want to make sure nobody else
|
1100 |
+
* has moved that post since the page was last updated. If the
|
1101 |
+
* old date in the database doesn't match the old date from the
|
1102 |
+
* browser then we return an error to the browser along with the
|
1103 |
+
* updated post data.
|
1104 |
+
*/
|
1105 |
+
$error = EDCAL_CONCURRENCY_ERROR;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1106 |
}
|
1107 |
+
|
1108 |
+
if ( $error ) {
|
1109 |
+
// die('error= '.$error);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1110 |
?>
|
1111 |
+
{
|
1112 |
+
"error": <?php echo $error; ?>,
|
1113 |
"post" :
|
1114 |
<?php
|
1115 |
$this->edcal_postJSON($post, false, true);
|
1118 |
<?php
|
1119 |
die();
|
1120 |
}
|
1121 |
+
|
1122 |
+
|
1123 |
/*
|
1124 |
+
* No errors, so let's go create our new post parameters to update
|
|
|
|
|
1125 |
*/
|
|
|
1126 |
|
1127 |
+
$updated_post = array();
|
1128 |
+
$updated_post['ID'] = $edcal_postid;
|
1129 |
+
|
1130 |
+
if ( !$move_to_drawer ) {
|
1131 |
+
$updated_post['post_date'] = $edcal_newDate . substr($post->post_date, strlen($edcal_newDate));
|
1132 |
+
}
|
1133 |
+
|
1134 |
/*
|
1135 |
* When a user creates a draft and never sets a date or publishes it
|
1136 |
* then the GMT date will have a timestamp of 00:00:00 to indicate
|
1138 |
* an edit date or the wp_update_post function will strip our new
|
1139 |
* date out and leave the post as publish immediately.
|
1140 |
*/
|
1141 |
+
$needsEditDate = preg_match( '/^0000/', $post->post_date_gmt );
|
1142 |
+
|
1143 |
+
if ( $needsEditDate ) {
|
1144 |
+
// echo "\r\nneeds edit date\r\n";
|
1145 |
+
$updated_post['edit_date'] = $edcal_newDate . substr($post->post_date, strlen($edcal_newDate));
|
|
|
|
|
1146 |
}
|
1147 |
+
|
1148 |
+
if ( $move_to_drawer ) {
|
1149 |
+
$updated_post['post_date_gmt'] = "0000-00-00 00:00:00";
|
1150 |
+
$updated_post['edit_date'] = $post->post_date;
|
1151 |
+
} else if ( $move_from_drawer ) {
|
1152 |
+
$updated_post['post_date_gmt'] = get_gmt_from_date($post->post_date);
|
1153 |
+
$updated_post['post_modified_gmt'] = get_gmt_from_date($post->post_date);
|
1154 |
+
}
|
1155 |
+
|
1156 |
/*
|
1157 |
* We need to make sure to use the GMT formatting for the date.
|
1158 |
*/
|
1159 |
+
if ( !$move_to_drawer ) {
|
1160 |
+
$updated_post['post_date_gmt'] = get_gmt_from_date($updated_post['post_date']);
|
1161 |
+
$updated_post['post_modified'] = $edcal_newDate . substr($post->post_modified, strlen($edcal_newDate));
|
1162 |
+
$updated_post['post_modified_gmt'] = get_gmt_from_date($updated_post['post_date']);
|
1163 |
+
}
|
1164 |
|
1165 |
+
if ($edcal_postStatus != $post->post_status) {
|
1166 |
/*
|
1167 |
* We only want to update the post status if it has changed.
|
1168 |
* If the post status has changed that takes a few more steps
|
1169 |
*/
|
1170 |
+
wp_transition_post_status($edcal_postStatus, $post->post_status, $post);
|
1171 |
$updated_post['post_status'] = $edcal_postStatus;
|
1172 |
|
1173 |
// Update counts for the post's terms.
|
1181 |
do_action('wp_insert_post', $edcal_postid, $post);
|
1182 |
}
|
1183 |
|
1184 |
+
// die(var_dump($updated_post).'success!');
|
1185 |
/*
|
1186 |
* Now we finally update the post into the database
|
1187 |
*/
|
edcal_test.js
CHANGED
@@ -24,9 +24,17 @@ var edcal_test = {
|
|
24 |
|
25 |
testContent: 'This is the content of the <b>unit test – post</b>. <!--more--> This is content after the more tag to make sure we a reading it.',
|
26 |
testContent2: 'This is the content of the <b>unit test – post</b>. <!--more--> This is content after the more tag to make sure we a reading it. - CHANGED',
|
27 |
-
|
28 |
|
29 |
runTests: function() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
jQuery('head').append('<link>');
|
31 |
css = jQuery('head').children(':last');
|
32 |
css.attr({
|
@@ -261,6 +269,92 @@ var edcal_test = {
|
|
261 |
|
262 |
start();
|
263 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
264 |
edcal_test.testEditPost();
|
265 |
});
|
266 |
});
|
@@ -374,8 +468,22 @@ var edcal_test = {
|
|
374 |
|
375 |
equals(jQuery('#post-' + res.post.id).length, 0, 'The post should now be deleted from the calendar.');
|
376 |
start();
|
|
|
|
|
377 |
|
378 |
});
|
379 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
380 |
}
|
381 |
};
|
24 |
|
25 |
testContent: 'This is the content of the <b>unit test – post</b>. <!--more--> This is content after the more tag to make sure we a reading it.',
|
26 |
testContent2: 'This is the content of the <b>unit test – post</b>. <!--more--> This is content after the more tag to make sure we a reading it. - CHANGED',
|
27 |
+
testContent3: 'This is the content of the <b>unit test – post</b>. <!--more--> This is content after the more tag to make sure we a reading it. - CHANGED DRAFT',
|
28 |
|
29 |
runTests: function() {
|
30 |
+
edcal_test.isDraftsDrawerVisible = edcal.isDraftsDrawerVisible;
|
31 |
+
|
32 |
+
edcal.setDraftsDrawerVisible(true, function() {
|
33 |
+
edcal_test.startTests();
|
34 |
+
});
|
35 |
+
},
|
36 |
+
|
37 |
+
startTests: function() {
|
38 |
jQuery('head').append('<link>');
|
39 |
css = jQuery('head').children(':last');
|
40 |
css.attr({
|
269 |
|
270 |
start();
|
271 |
|
272 |
+
edcal_test.testMovePostDraft();
|
273 |
+
});
|
274 |
+
});
|
275 |
+
|
276 |
+
},
|
277 |
+
|
278 |
+
testMovePostDraft: function() {
|
279 |
+
|
280 |
+
asyncTest('Move an existing post to the drafts drawer', function() {
|
281 |
+
expect(2);
|
282 |
+
|
283 |
+
edcal.doDrop(edcal_test.post.date, 'post-' + edcal_test.post.id, edcal.NO_DATE, function(res) {
|
284 |
+
|
285 |
+
if (!res.post) {
|
286 |
+
ok(false, 'There was an error creating the new post.');
|
287 |
+
return;
|
288 |
+
}
|
289 |
+
|
290 |
+
equals(res.post.date_gmt, edcal.NO_DATE, 'The resulting post should have the same date as the request and it was ' + res.post.date);
|
291 |
+
|
292 |
+
equals(jQuery('#post-' + res.post.id).length, 1, 'The post should be added in only one place in the calendar.');
|
293 |
+
|
294 |
+
edcal_test.post = res.post;
|
295 |
+
|
296 |
+
start();
|
297 |
+
|
298 |
+
edcal_test.testEditPostDraft();
|
299 |
+
});
|
300 |
+
});
|
301 |
+
|
302 |
+
},
|
303 |
+
|
304 |
+
testEditPostDraft: function() {
|
305 |
+
|
306 |
+
asyncTest('Edit the content of a draft post', function() {
|
307 |
+
expect(2);
|
308 |
+
|
309 |
+
edcal_test.post.title = 'Unit Test Draft Post – Changed';
|
310 |
+
edcal_test.post.content = edcal_test.testContent3;
|
311 |
+
|
312 |
+
edcal.savePost(edcal_test.post, false, false, function(res)
|
313 |
+
{
|
314 |
+
if (!res.post) {
|
315 |
+
ok(false, 'There was an error editing the post.');
|
316 |
+
start();
|
317 |
+
return;
|
318 |
+
}
|
319 |
+
|
320 |
+
equals(res.post.title, edcal_test.post.title, 'The resulting post should have the same title as the request');
|
321 |
+
|
322 |
+
equals(jQuery('#post-' + res.post.id).length, 1, 'The post should be added in only one place in the calendar.');
|
323 |
+
|
324 |
+
edcal_test.post = res.post;
|
325 |
+
|
326 |
+
start();
|
327 |
+
|
328 |
+
edcal_test.testMovePostDraftSchedule();
|
329 |
+
|
330 |
+
});
|
331 |
+
});
|
332 |
+
},
|
333 |
+
|
334 |
+
testMovePostDraftSchedule: function() {
|
335 |
+
|
336 |
+
asyncTest('Move a post from the drafts drawer back to the calendar', function() {
|
337 |
+
expect(2);
|
338 |
+
|
339 |
+
// We added the post one week in the future, now we will move it
|
340 |
+
// two days after that.
|
341 |
+
var newDate = Date.today().add(23).days().toString(edcal.internalDateFormat);
|
342 |
+
|
343 |
+
edcal.doDrop(edcal.NO_DATE, 'post-' + edcal_test.post.id, newDate, function(res) {
|
344 |
+
|
345 |
+
if (!res.post) {
|
346 |
+
ok(false, 'There was an error creating the new post.');
|
347 |
+
return;
|
348 |
+
}
|
349 |
+
|
350 |
+
equals(res.post.date, newDate, 'The resulting post should have the same date as the request and it was ' + res.post.date);
|
351 |
+
|
352 |
+
equals(jQuery('#post-' + res.post.id).length, 1, 'The post should be added in only one place in the calendar.');
|
353 |
+
|
354 |
+
edcal_test.post = res.post;
|
355 |
+
|
356 |
+
start();
|
357 |
+
|
358 |
edcal_test.testEditPost();
|
359 |
});
|
360 |
});
|
468 |
|
469 |
equals(jQuery('#post-' + res.post.id).length, 0, 'The post should now be deleted from the calendar.');
|
470 |
start();
|
471 |
+
|
472 |
+
edcal_test.finishTests();
|
473 |
|
474 |
});
|
475 |
});
|
476 |
+
},
|
477 |
+
|
478 |
+
finishTests: function() {
|
479 |
+
if (!edcal_test.isDraftsDrawerVisible) {
|
480 |
+
/*
|
481 |
+
* We need to make sure the drafts drawer is open because
|
482 |
+
* we can use it in the tests so we open it when the tests
|
483 |
+
* start if it isn't open already. We want to close it at
|
484 |
+
* the end if we opened it.
|
485 |
+
*/
|
486 |
+
edcal.setDraftsDrawerVisible(false);
|
487 |
+
}
|
488 |
}
|
489 |
};
|
languages/editorial-calendar-fr_FR.mo
CHANGED
Binary file
|
languages/editorial-calendar-fr_FR.po
CHANGED
@@ -1,191 +1,185 @@
|
|
1 |
-
# Translation of
|
2 |
-
#
|
3 |
-
# This file is distributed under the same license as the package.
|
4 |
-
# COLIN VERNON <COLIN@STRESSLIMITDESIGN.COM>, 2010.
|
5 |
-
#
|
6 |
msgid ""
|
7 |
msgstr ""
|
8 |
-
"
|
9 |
-
"Report-Msgid-Bugs-To: http://wordpress.org/tag/editorial-calendar\n"
|
10 |
-
"POT-Creation-Date: 2010-01-14 20:13+0000\n"
|
11 |
-
"PO-Revision-Date: 2010-01-18 10:08-0500\n"
|
12 |
-
"Last-Translator: Zack Grossbart <zack@grossbart.com>\n"
|
13 |
-
"Language-Team: LANGUAGE <LL@li.org>\n"
|
14 |
"MIME-Version: 1.0\n"
|
15 |
-
"Content-Type: text/plain; charset=
|
16 |
"Content-Transfer-Encoding: 8bit\n"
|
|
|
|
|
|
|
|
|
|
|
|
|
17 |
|
18 |
-
#: edcal.php:60
|
19 |
msgid "Calendar"
|
20 |
msgstr "Calendrier"
|
21 |
|
22 |
-
#: edcal.php:130
|
23 |
-
#: edcal.php:277
|
24 |
msgid "en-US"
|
25 |
-
msgstr "
|
26 |
-
|
27 |
-
#: edcal.php:138
|
28 |
-
msgid "on"
|
29 |
-
msgstr "le"
|
30 |
-
|
31 |
-
#: edcal.php:139
|
32 |
-
msgid "by"
|
33 |
-
msgstr "par"
|
34 |
-
|
35 |
-
#: edcal.php:140
|
36 |
-
msgid "at"
|
37 |
-
msgstr "à"
|
38 |
|
39 |
-
|
40 |
-
|
41 |
-
msgstr "Ajouter un post"
|
42 |
|
43 |
-
|
44 |
-
|
45 |
-
msgstr "Dimanche"
|
46 |
|
47 |
-
|
48 |
-
|
49 |
-
msgstr "Lundi"
|
50 |
-
|
51 |
-
#: edcal.php:146
|
52 |
-
msgid "Tuesday"
|
53 |
-
msgstr "Mardi"
|
54 |
|
55 |
-
|
56 |
-
|
57 |
-
msgstr "Mercredi"
|
58 |
|
59 |
-
|
60 |
-
|
61 |
-
msgstr "Jeudi"
|
62 |
|
63 |
-
|
64 |
-
|
65 |
-
msgstr "Vendredi"
|
66 |
|
67 |
-
|
68 |
-
|
69 |
-
msgstr "Samedi"
|
70 |
|
71 |
-
#: edcal.php:152
|
72 |
-
msgid " [DRAFT]"
|
73 |
-
msgstr " [BROUILLON]"
|
74 |
-
|
75 |
-
#: edcal.php:153
|
76 |
msgid "Edit"
|
77 |
msgstr "Éditer"
|
78 |
|
79 |
-
|
|
|
|
|
80 |
msgid "Delete"
|
81 |
msgstr "Supprimer"
|
82 |
|
83 |
-
#: edcal.php:155
|
84 |
msgid "View"
|
85 |
msgstr "Voir"
|
86 |
|
87 |
-
#: edcal.php:156
|
88 |
-
msgid "Republish"
|
89 |
-
msgstr "Republier"
|
90 |
-
|
91 |
-
#: edcal.php:157
|
92 |
msgid "Status:"
|
93 |
-
msgstr "
|
94 |
|
95 |
-
#: edcal.php:158
|
96 |
msgid "Cancel"
|
97 |
msgstr "Annuler"
|
98 |
|
99 |
-
|
100 |
-
|
101 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
102 |
|
103 |
-
|
104 |
-
|
105 |
-
msgstr "Enregistrer brouillon"
|
106 |
|
107 |
-
|
108 |
-
|
109 |
-
msgstr "Enregistrer et éditer brouillon"
|
110 |
|
111 |
-
|
112 |
-
|
113 |
-
msgstr "Ajouter un nouveau post le "
|
114 |
|
115 |
-
|
116 |
-
|
117 |
-
msgstr "Vous allez supprimer le post '"
|
118 |
|
119 |
-
|
120 |
-
|
121 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
122 |
|
123 |
-
#: edcal.php:167
|
124 |
msgid "Looks like someone else already moved this post."
|
125 |
msgstr "Quelqu'un d'autre a déjà déplacé ce post."
|
126 |
|
127 |
-
#: edcal.php:168
|
128 |
msgid "You do not have permission to edit posts."
|
129 |
msgstr "Vous n'avez pas les permissions d'éditer les posts."
|
130 |
|
131 |
-
#: edcal.php:169
|
132 |
msgid "Invalid checksum for post. This is commonly a cross-site scripting error."
|
133 |
-
msgstr "Désolé,
|
134 |
|
135 |
-
#: edcal.php:170
|
136 |
msgid "There was an error contacting your blog."
|
137 |
msgstr "Une erreur est survenue en contactant votre blog."
|
138 |
|
139 |
-
#: edcal.php:172
|
140 |
msgid "Screen Options"
|
141 |
msgstr "Options d'affichage"
|
142 |
|
143 |
-
|
144 |
-
|
145 |
-
|
|
|
|
|
146 |
|
147 |
-
#: edcal.php:174
|
148 |
msgid "Apply"
|
149 |
msgstr "Appliquer"
|
150 |
|
151 |
-
|
152 |
-
|
153 |
-
msgstr "Afficher "
|
154 |
|
155 |
-
|
156 |
-
msgid "weeks at a time"
|
157 |
msgstr "semaines à la fois"
|
158 |
|
159 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
160 |
msgid "The calendar can only show between 1 and 5 weeks at a time."
|
161 |
msgstr "Le calendrier ne peut afficher qu'une à cinq semaines à la fois."
|
162 |
|
163 |
-
|
164 |
-
|
165 |
-
msgstr "Entrer le nombre de semaines que le calendrier va afficher (entre 1 et 5)"
|
166 |
|
167 |
-
|
168 |
-
|
169 |
-
msgstr "Calendrier de posts"
|
170 |
|
171 |
-
#: edcal.php:223
|
172 |
msgid "Jump back"
|
173 |
msgstr "Mois précédent"
|
174 |
|
175 |
-
#: edcal.php:225
|
176 |
msgid "Skip ahead"
|
177 |
msgstr "Mois suivant"
|
178 |
|
179 |
-
|
180 |
-
|
181 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
182 |
|
183 |
-
|
184 |
-
|
185 |
-
msgstr "Aujourd'hui"
|
186 |
|
187 |
-
|
188 |
-
|
189 |
-
msgid "ga"
|
190 |
-
msgstr "H"
|
191 |
|
|
|
|
1 |
+
# Translation of WordPress Editorial Calendar in French (France)
|
2 |
+
# This file is distributed under the same license as the WordPress Editorial Calendar package.
|
|
|
|
|
|
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
+
"PO-Revision-Date: 2012-02-27 08:53:18+0000\n"
|
|
|
|
|
|
|
|
|
|
|
6 |
"MIME-Version: 1.0\n"
|
7 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
8 |
"Content-Transfer-Encoding: 8bit\n"
|
9 |
+
"Plural-Forms: nplurals=2; plural=n > 1;\n"
|
10 |
+
"X-Generator: GlotPress/0.1\n"
|
11 |
+
"Project-Id-Version: WordPress Editorial Calendar\n"
|
12 |
+
|
13 |
+
msgid "%1$s Calendar"
|
14 |
+
msgstr "Calendrier des %1$s"
|
15 |
|
|
|
16 |
msgid "Calendar"
|
17 |
msgstr "Calendrier"
|
18 |
|
|
|
|
|
19 |
msgid "en-US"
|
20 |
+
msgstr "fr-FR"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
21 |
|
22 |
+
msgid "%1$s by %2$s"
|
23 |
+
msgstr "%1$s par %2$s"
|
|
|
24 |
|
25 |
+
msgid "New Post"
|
26 |
+
msgstr "Nouveau post"
|
|
|
27 |
|
28 |
+
msgid " [DRAFT]"
|
29 |
+
msgstr " [BROUILLON]"
|
|
|
|
|
|
|
|
|
|
|
30 |
|
31 |
+
msgid " [PENDING]"
|
32 |
+
msgstr " [EN ATTENTE]"
|
|
|
33 |
|
34 |
+
msgid " [STICKY]"
|
35 |
+
msgstr " [EN PRIORITÉ]"
|
|
|
36 |
|
37 |
+
msgid " [DRAFT, STICKY]"
|
38 |
+
msgstr " [BROUILLON, STICKY]"
|
|
|
39 |
|
40 |
+
msgid " [PENDING, STICKY]"
|
41 |
+
msgstr " [EN ATTENTE, EN PRIORITÉ]"
|
|
|
42 |
|
|
|
|
|
|
|
|
|
|
|
43 |
msgid "Edit"
|
44 |
msgstr "Éditer"
|
45 |
|
46 |
+
msgid "Quick Edit"
|
47 |
+
msgstr "Éditer rapide"
|
48 |
+
|
49 |
msgid "Delete"
|
50 |
msgstr "Supprimer"
|
51 |
|
|
|
52 |
msgid "View"
|
53 |
msgstr "Voir"
|
54 |
|
|
|
|
|
|
|
|
|
|
|
55 |
msgid "Status:"
|
56 |
+
msgstr "Statut :"
|
57 |
|
|
|
58 |
msgid "Cancel"
|
59 |
msgstr "Annuler"
|
60 |
|
61 |
+
msgid "Title"
|
62 |
+
msgstr "Titre"
|
63 |
+
|
64 |
+
msgid "Content"
|
65 |
+
msgstr "Contenu"
|
66 |
+
|
67 |
+
msgid "Add a new post on %s"
|
68 |
+
msgstr "Ajouter un article au %s"
|
69 |
+
|
70 |
+
msgid "New %s - "
|
71 |
+
msgstr "Nouveau %s - "
|
72 |
|
73 |
+
msgid "Update"
|
74 |
+
msgstr "Mettre à jour"
|
|
|
75 |
|
76 |
+
msgid "Schedule"
|
77 |
+
msgstr "Horaire"
|
|
|
78 |
|
79 |
+
msgid "Submit for Review"
|
80 |
+
msgstr "Soumettre pour revision"
|
|
|
81 |
|
82 |
+
msgid "Save"
|
83 |
+
msgstr "Sauvegarder"
|
|
|
84 |
|
85 |
+
msgid "Edit %1$s - %2$s"
|
86 |
+
msgstr "Éditer %1$s - %2$s"
|
87 |
+
|
88 |
+
msgid "Scheduled"
|
89 |
+
msgstr "Planifié"
|
90 |
+
|
91 |
+
msgid "You are about to delete the post \""
|
92 |
+
msgstr "Vous allez supprimer le post \""
|
93 |
+
|
94 |
+
msgid "\". Press Cancel to stop, OK to delete."
|
95 |
+
msgstr "\". Cliquer OK pour confirmer."
|
96 |
|
|
|
97 |
msgid "Looks like someone else already moved this post."
|
98 |
msgstr "Quelqu'un d'autre a déjà déplacé ce post."
|
99 |
|
|
|
100 |
msgid "You do not have permission to edit posts."
|
101 |
msgstr "Vous n'avez pas les permissions d'éditer les posts."
|
102 |
|
|
|
103 |
msgid "Invalid checksum for post. This is commonly a cross-site scripting error."
|
104 |
+
msgstr "Désolé, les donnés de l'article sont corrompu, il se peut que ce soit une erreur de 'cross-site scripting' (XSS)."
|
105 |
|
|
|
106 |
msgid "There was an error contacting your blog."
|
107 |
msgstr "Une erreur est survenue en contactant votre blog."
|
108 |
|
|
|
109 |
msgid "Screen Options"
|
110 |
msgstr "Options d'affichage"
|
111 |
|
112 |
+
msgid "Colors"
|
113 |
+
msgstr "Couleurs"
|
114 |
+
|
115 |
+
msgid "Drafts: "
|
116 |
+
msgstr "Brouillons:"
|
117 |
|
|
|
118 |
msgid "Apply"
|
119 |
msgstr "Appliquer"
|
120 |
|
121 |
+
msgid "Show on screen"
|
122 |
+
msgstr "Afficher"
|
|
|
123 |
|
124 |
+
msgid " weeks at a time"
|
|
|
125 |
msgstr "semaines à la fois"
|
126 |
|
127 |
+
msgid "Show in Calendar Cell"
|
128 |
+
msgstr "Afficher en calendrier"
|
129 |
+
|
130 |
+
msgid "Author"
|
131 |
+
msgstr "Auteur"
|
132 |
+
|
133 |
+
msgid "Status"
|
134 |
+
msgstr "Statut"
|
135 |
+
|
136 |
+
msgid "Time of day"
|
137 |
+
msgstr "Heure"
|
138 |
+
|
139 |
+
msgid "An error occurred while loading the calendar: "
|
140 |
+
msgstr "Il y a eu un erreur en chargement du calendrier : "
|
141 |
+
|
142 |
msgid "The calendar can only show between 1 and 5 weeks at a time."
|
143 |
msgstr "Le calendrier ne peut afficher qu'une à cinq semaines à la fois."
|
144 |
|
145 |
+
msgid "Select the number of weeks for the calendar to show."
|
146 |
+
msgstr "Sélectionner le nombre de semaines à afficher au calendrier."
|
|
|
147 |
|
148 |
+
msgid "<h2>We're done</h2>We've finished collecting data. Thank you for helping us make the calendar better."
|
149 |
+
msgstr "<h2>C'est tout !</h2>On a tout finit. Merci de nous aider à améliorer le calendrier."
|
|
|
150 |
|
|
|
151 |
msgid "Jump back"
|
152 |
msgstr "Mois précédent"
|
153 |
|
|
|
154 |
msgid "Skip ahead"
|
155 |
msgstr "Mois suivant"
|
156 |
|
157 |
+
msgid "Scroll the calendar and make the today visible"
|
158 |
+
msgstr "Sauter à aujourd'hui"
|
159 |
+
|
160 |
+
msgid "Show Today"
|
161 |
+
msgstr "Voir aujourd'hui"
|
162 |
+
|
163 |
+
msgid "Edit Post"
|
164 |
+
msgstr "Éditer l'article"
|
165 |
+
|
166 |
+
msgid "Time"
|
167 |
+
msgstr "Heure"
|
168 |
+
|
169 |
+
msgid "Draft"
|
170 |
+
msgstr "Brouillon"
|
171 |
+
|
172 |
+
msgid "Pending Review"
|
173 |
+
msgstr "En attente de relecture"
|
174 |
+
|
175 |
+
msgid "Posts "
|
176 |
+
msgstr "Articles"
|
177 |
|
178 |
+
msgid "Post "
|
179 |
+
msgstr "Article"
|
|
|
180 |
|
181 |
+
msgid "Error in deleting..."
|
182 |
+
msgstr "Erreur en supprimant..."
|
|
|
|
|
183 |
|
184 |
+
msgid "ltr"
|
185 |
+
msgstr "ltr"
|
languages/editorial-calendar-pt_BR.mo
CHANGED
Binary file
|
languages/editorial-calendar-pt_BR.po
CHANGED
@@ -1,244 +1,189 @@
|
|
1 |
-
#
|
2 |
-
# This file is distributed under the same license as the
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
-
"
|
6 |
-
"Report-Msgid-Bugs-To: http://wordpress.org/tag/editorial-calendar\n"
|
7 |
-
"POT-Creation-Date: 2011-01-03 12:24:41+00:00\n"
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
11 |
-
"
|
|
|
|
|
|
|
12 |
"Last-Translator: Zack Grossbart <zack@grossbart.com>\n"
|
13 |
-
"Language-Team:
|
|
|
|
|
|
|
14 |
|
15 |
-
#: edcal.php:71
|
16 |
-
#: edcal.php:93
|
17 |
msgid "Calendar"
|
18 |
msgstr "Calendário"
|
19 |
|
20 |
-
#: edcal.php:221
|
21 |
-
#: edcal.php:465
|
22 |
msgid "en-US"
|
23 |
msgstr "pt-BR"
|
24 |
|
25 |
-
#: edcal.php:229
|
26 |
msgid "%1$s by %2$s"
|
27 |
msgstr "%1$s por %2$s"
|
28 |
|
29 |
-
#: edcal.php:231
|
30 |
msgid "New Post"
|
31 |
msgstr "Novo Post"
|
32 |
|
33 |
-
#: edcal.php:233
|
34 |
msgid " [DRAFT]"
|
35 |
msgstr "[RASCUNHO]"
|
36 |
|
37 |
-
#: edcal.php:234
|
38 |
msgid " [PENDING]"
|
39 |
msgstr "[PENDENTE]"
|
40 |
|
41 |
-
#: edcal.php:235
|
42 |
msgid " [STICKY]"
|
43 |
msgstr "[FIXO]"
|
44 |
|
45 |
-
#: edcal.php:236
|
46 |
msgid " [DRAFT, STICKY]"
|
47 |
msgstr "[RASCUNHO, FIXO]"
|
48 |
|
49 |
-
#: edcal.php:237
|
50 |
msgid " [PENDING, STICKY]"
|
51 |
msgstr "[PENDENTE, FIXO]"
|
52 |
|
53 |
-
#: edcal.php:238
|
54 |
-
#: edcal.php:242
|
55 |
msgid "Edit"
|
56 |
msgstr "Editar"
|
57 |
|
58 |
-
#: edcal.php:239
|
59 |
msgid "Quick Edit"
|
60 |
msgstr "Ed Rápida"
|
61 |
|
62 |
-
#: edcal.php:240
|
63 |
msgid "Delete"
|
64 |
msgstr "Deletar"
|
65 |
|
66 |
-
#: edcal.php:241
|
67 |
msgid "View"
|
68 |
msgstr "Ver"
|
69 |
|
70 |
-
#: edcal.php:243
|
71 |
msgid "Status:"
|
72 |
msgstr "Estado:"
|
73 |
|
74 |
-
#: edcal.php:244
|
75 |
-
#: edcal.php:409
|
76 |
msgid "Cancel"
|
77 |
msgstr "Cancelar"
|
78 |
|
79 |
-
#: edcal.php:245
|
80 |
-
#: edcal.php:363
|
81 |
msgid "Title"
|
82 |
msgstr "Título"
|
83 |
|
84 |
-
#: edcal.php:246
|
85 |
-
#: edcal.php:368
|
86 |
msgid "Content"
|
87 |
msgstr "Conteúdo"
|
88 |
|
89 |
-
|
90 |
-
|
91 |
-
msgstr "Adicionar novo post em "
|
92 |
|
93 |
-
#: edcal.php:248
|
94 |
msgid "New %s - "
|
95 |
msgstr "Novo %s - "
|
96 |
|
97 |
-
#: edcal.php:249
|
98 |
msgid "Update"
|
99 |
msgstr "Atualizar"
|
100 |
|
101 |
-
#: edcal.php:250
|
102 |
-
#: edcal.php:408
|
103 |
msgid "Schedule"
|
104 |
msgstr "Agendar"
|
105 |
|
106 |
-
#: edcal.php:251
|
107 |
msgid "Submit for Review"
|
108 |
msgstr "Enviar para Revisão"
|
109 |
|
110 |
-
#: edcal.php:252
|
111 |
msgid "Save"
|
112 |
msgstr "Salvar"
|
113 |
|
114 |
-
#: edcal.php:253
|
115 |
msgid "Edit %1$s - %2$s"
|
116 |
msgstr "Editar %1$s - %2$s"
|
117 |
|
118 |
-
#: edcal.php:254
|
119 |
-
#: edcal.php:394
|
120 |
msgid "Scheduled"
|
121 |
-
msgstr "
|
122 |
|
123 |
-
#: edcal.php:256
|
124 |
msgid "You are about to delete the post \""
|
125 |
msgstr "Você está prestes a deletar o post \""
|
126 |
|
127 |
-
#: edcal.php:257
|
128 |
msgid "\". Press Cancel to stop, OK to delete."
|
129 |
msgstr "\". Clique Cancelar para parar, OK para deletar."
|
130 |
|
131 |
-
#: edcal.php:259
|
132 |
msgid "Looks like someone else already moved this post."
|
133 |
msgstr "Parece que alguém já moveu este post."
|
134 |
|
135 |
-
#: edcal.php:260
|
136 |
msgid "You do not have permission to edit posts."
|
137 |
msgstr "Você não tem permissão para editar posts"
|
138 |
|
139 |
-
#: edcal.php:261
|
140 |
msgid "Invalid checksum for post. This is commonly a cross-site scripting error."
|
141 |
msgstr "Soma de verificação inválida para o post. Este é normalmente um erro de cross-site scripting."
|
142 |
|
143 |
-
#: edcal.php:262
|
144 |
msgid "There was an error contacting your blog."
|
145 |
msgstr "Ocorreu um erro contatando seu blog."
|
146 |
|
147 |
-
#: edcal.php:264
|
148 |
msgid "Screen Options"
|
149 |
msgstr "Opções de Tela"
|
150 |
|
151 |
-
#: edcal.php:265
|
152 |
msgid "Colors"
|
153 |
msgstr "Cores"
|
154 |
|
155 |
-
#: edcal.php:266
|
156 |
msgid "Drafts: "
|
157 |
msgstr "Rascunhos: "
|
158 |
|
159 |
-
#: edcal.php:267
|
160 |
msgid "Apply"
|
161 |
msgstr "Aplicar"
|
162 |
|
163 |
-
#: edcal.php:268
|
164 |
msgid "Show on screen"
|
165 |
msgstr "Exibir na tela"
|
166 |
|
167 |
-
#: edcal.php:269
|
168 |
msgid " weeks at a time"
|
169 |
msgstr " semanas de uma vez"
|
170 |
|
171 |
-
#: edcal.php:270
|
172 |
msgid "Show in Calendar Cell"
|
173 |
msgstr "Mostrar na Célula do Calendário"
|
174 |
|
175 |
-
#: edcal.php:271
|
176 |
msgid "Author"
|
177 |
msgstr "Autor"
|
178 |
|
179 |
-
#: edcal.php:272
|
180 |
-
#: edcal.php:388
|
181 |
msgid "Status"
|
182 |
msgstr "Estado"
|
183 |
|
184 |
-
#: edcal.php:273
|
185 |
msgid "Time of day"
|
186 |
msgstr "Hora do dia"
|
187 |
|
188 |
-
#: edcal.php:274
|
189 |
msgid "An error occurred while loading the calendar: "
|
190 |
msgstr "Ocorreu um erro carregando o calendário: "
|
191 |
|
192 |
-
#: edcal.php:276
|
193 |
msgid "The calendar can only show between 1 and 5 weeks at a time."
|
194 |
msgstr "O calendário só pode exibir entre 1 e 5 semanas de uma vez."
|
195 |
|
196 |
-
#: edcal.php:277
|
197 |
msgid "Select the number of weeks for the calendar to show."
|
198 |
msgstr "Selecione o número de semanas a exibir no calendário."
|
199 |
|
200 |
-
#: edcal.php:285
|
201 |
msgid "<h2>We're done</h2>We've finished collecting data. Thank you for helping us make the calendar better."
|
202 |
msgstr "<h2>Feito</h2>Acabamos a coleta de dados. Obrigado por nos ajudar a fazer o calendário melhor."
|
203 |
|
204 |
-
#: edcal.php:326
|
205 |
-
msgid " Calendar"
|
206 |
-
msgstr " - Calendário"
|
207 |
-
|
208 |
-
#: edcal.php:335
|
209 |
msgid "Jump back"
|
210 |
msgstr "Para trás"
|
211 |
|
212 |
-
#: edcal.php:337
|
213 |
msgid "Skip ahead"
|
214 |
msgstr "Para frente"
|
215 |
|
216 |
-
#: edcal.php:342
|
217 |
msgid "Scroll the calendar and make the today visible"
|
218 |
msgstr "Rolar o calendário e fazer 'hoje' visível"
|
219 |
|
220 |
-
#: edcal.php:342
|
221 |
msgid "Show Today"
|
222 |
msgstr "Mostrar Hoje"
|
223 |
|
224 |
-
#: edcal.php:354
|
225 |
msgid "Edit Post"
|
226 |
msgstr "Editar Post"
|
227 |
|
228 |
-
#: edcal.php:383
|
229 |
msgid "Time"
|
230 |
msgstr "Hora"
|
231 |
|
232 |
-
#: edcal.php:391
|
233 |
msgid "Draft"
|
234 |
msgstr "Rascunho"
|
235 |
|
236 |
-
#: edcal.php:392
|
237 |
msgid "Pending Review"
|
238 |
msgstr "Revisão Pendente"
|
239 |
|
240 |
-
|
241 |
-
|
|
|
|
|
|
|
|
|
242 |
msgid "Error in deleting..."
|
243 |
msgstr "Erro ao deletar..."
|
244 |
|
|
|
|
|
|
1 |
+
# Translation of WordPress Editorial Calendar in Portuguese (Brazil)
|
2 |
+
# This file is distributed under the same license as the WordPress Editorial Calendar package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
+
"PO-Revision-Date: 2012-05-08 13:01-0500\n"
|
|
|
|
|
6 |
"MIME-Version: 1.0\n"
|
7 |
"Content-Type: text/plain; charset=UTF-8\n"
|
8 |
"Content-Transfer-Encoding: 8bit\n"
|
9 |
+
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
|
10 |
+
"X-Generator: GlotPress/0.1\n"
|
11 |
+
"Project-Id-Version: WordPress Editorial Calendar\n"
|
12 |
+
"POT-Creation-Date: \n"
|
13 |
"Last-Translator: Zack Grossbart <zack@grossbart.com>\n"
|
14 |
+
"Language-Team: \n"
|
15 |
+
|
16 |
+
msgid "%1$s Calendar"
|
17 |
+
msgstr "%1$s Calendário"
|
18 |
|
|
|
|
|
19 |
msgid "Calendar"
|
20 |
msgstr "Calendário"
|
21 |
|
|
|
|
|
22 |
msgid "en-US"
|
23 |
msgstr "pt-BR"
|
24 |
|
|
|
25 |
msgid "%1$s by %2$s"
|
26 |
msgstr "%1$s por %2$s"
|
27 |
|
|
|
28 |
msgid "New Post"
|
29 |
msgstr "Novo Post"
|
30 |
|
|
|
31 |
msgid " [DRAFT]"
|
32 |
msgstr "[RASCUNHO]"
|
33 |
|
|
|
34 |
msgid " [PENDING]"
|
35 |
msgstr "[PENDENTE]"
|
36 |
|
|
|
37 |
msgid " [STICKY]"
|
38 |
msgstr "[FIXO]"
|
39 |
|
|
|
40 |
msgid " [DRAFT, STICKY]"
|
41 |
msgstr "[RASCUNHO, FIXO]"
|
42 |
|
|
|
43 |
msgid " [PENDING, STICKY]"
|
44 |
msgstr "[PENDENTE, FIXO]"
|
45 |
|
|
|
|
|
46 |
msgid "Edit"
|
47 |
msgstr "Editar"
|
48 |
|
|
|
49 |
msgid "Quick Edit"
|
50 |
msgstr "Ed Rápida"
|
51 |
|
|
|
52 |
msgid "Delete"
|
53 |
msgstr "Deletar"
|
54 |
|
|
|
55 |
msgid "View"
|
56 |
msgstr "Ver"
|
57 |
|
|
|
58 |
msgid "Status:"
|
59 |
msgstr "Estado:"
|
60 |
|
|
|
|
|
61 |
msgid "Cancel"
|
62 |
msgstr "Cancelar"
|
63 |
|
|
|
|
|
64 |
msgid "Title"
|
65 |
msgstr "Título"
|
66 |
|
|
|
|
|
67 |
msgid "Content"
|
68 |
msgstr "Conteúdo"
|
69 |
|
70 |
+
msgid "Add a new post on %s"
|
71 |
+
msgstr "Novo post em %s"
|
|
|
72 |
|
|
|
73 |
msgid "New %s - "
|
74 |
msgstr "Novo %s - "
|
75 |
|
|
|
76 |
msgid "Update"
|
77 |
msgstr "Atualizar"
|
78 |
|
|
|
|
|
79 |
msgid "Schedule"
|
80 |
msgstr "Agendar"
|
81 |
|
|
|
82 |
msgid "Submit for Review"
|
83 |
msgstr "Enviar para Revisão"
|
84 |
|
|
|
85 |
msgid "Save"
|
86 |
msgstr "Salvar"
|
87 |
|
|
|
88 |
msgid "Edit %1$s - %2$s"
|
89 |
msgstr "Editar %1$s - %2$s"
|
90 |
|
|
|
|
|
91 |
msgid "Scheduled"
|
92 |
+
msgstr "Agendado"
|
93 |
|
|
|
94 |
msgid "You are about to delete the post \""
|
95 |
msgstr "Você está prestes a deletar o post \""
|
96 |
|
|
|
97 |
msgid "\". Press Cancel to stop, OK to delete."
|
98 |
msgstr "\". Clique Cancelar para parar, OK para deletar."
|
99 |
|
|
|
100 |
msgid "Looks like someone else already moved this post."
|
101 |
msgstr "Parece que alguém já moveu este post."
|
102 |
|
|
|
103 |
msgid "You do not have permission to edit posts."
|
104 |
msgstr "Você não tem permissão para editar posts"
|
105 |
|
|
|
106 |
msgid "Invalid checksum for post. This is commonly a cross-site scripting error."
|
107 |
msgstr "Soma de verificação inválida para o post. Este é normalmente um erro de cross-site scripting."
|
108 |
|
|
|
109 |
msgid "There was an error contacting your blog."
|
110 |
msgstr "Ocorreu um erro contatando seu blog."
|
111 |
|
|
|
112 |
msgid "Screen Options"
|
113 |
msgstr "Opções de Tela"
|
114 |
|
|
|
115 |
msgid "Colors"
|
116 |
msgstr "Cores"
|
117 |
|
|
|
118 |
msgid "Drafts: "
|
119 |
msgstr "Rascunhos: "
|
120 |
|
|
|
121 |
msgid "Apply"
|
122 |
msgstr "Aplicar"
|
123 |
|
|
|
124 |
msgid "Show on screen"
|
125 |
msgstr "Exibir na tela"
|
126 |
|
|
|
127 |
msgid " weeks at a time"
|
128 |
msgstr " semanas de uma vez"
|
129 |
|
|
|
130 |
msgid "Show in Calendar Cell"
|
131 |
msgstr "Mostrar na Célula do Calendário"
|
132 |
|
|
|
133 |
msgid "Author"
|
134 |
msgstr "Autor"
|
135 |
|
|
|
|
|
136 |
msgid "Status"
|
137 |
msgstr "Estado"
|
138 |
|
|
|
139 |
msgid "Time of day"
|
140 |
msgstr "Hora do dia"
|
141 |
|
|
|
142 |
msgid "An error occurred while loading the calendar: "
|
143 |
msgstr "Ocorreu um erro carregando o calendário: "
|
144 |
|
|
|
145 |
msgid "The calendar can only show between 1 and 5 weeks at a time."
|
146 |
msgstr "O calendário só pode exibir entre 1 e 5 semanas de uma vez."
|
147 |
|
|
|
148 |
msgid "Select the number of weeks for the calendar to show."
|
149 |
msgstr "Selecione o número de semanas a exibir no calendário."
|
150 |
|
|
|
151 |
msgid "<h2>We're done</h2>We've finished collecting data. Thank you for helping us make the calendar better."
|
152 |
msgstr "<h2>Feito</h2>Acabamos a coleta de dados. Obrigado por nos ajudar a fazer o calendário melhor."
|
153 |
|
|
|
|
|
|
|
|
|
|
|
154 |
msgid "Jump back"
|
155 |
msgstr "Para trás"
|
156 |
|
|
|
157 |
msgid "Skip ahead"
|
158 |
msgstr "Para frente"
|
159 |
|
|
|
160 |
msgid "Scroll the calendar and make the today visible"
|
161 |
msgstr "Rolar o calendário e fazer 'hoje' visível"
|
162 |
|
|
|
163 |
msgid "Show Today"
|
164 |
msgstr "Mostrar Hoje"
|
165 |
|
|
|
166 |
msgid "Edit Post"
|
167 |
msgstr "Editar Post"
|
168 |
|
|
|
169 |
msgid "Time"
|
170 |
msgstr "Hora"
|
171 |
|
|
|
172 |
msgid "Draft"
|
173 |
msgstr "Rascunho"
|
174 |
|
|
|
175 |
msgid "Pending Review"
|
176 |
msgstr "Revisão Pendente"
|
177 |
|
178 |
+
msgid "Posts "
|
179 |
+
msgstr "Posts "
|
180 |
+
|
181 |
+
msgid "Post "
|
182 |
+
msgstr "Post "
|
183 |
+
|
184 |
msgid "Error in deleting..."
|
185 |
msgstr "Erro ao deletar..."
|
186 |
|
187 |
+
msgid "ltr"
|
188 |
+
msgstr "ltr"
|
189 |
+
|
languages/editorial-calendar-template.pot
ADDED
@@ -0,0 +1,182 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Translation of Editorial Calendar
|
2 |
+
# This file is distributed under the same license as the Editorial Calendar package.
|
3 |
+
msgid ""
|
4 |
+
msgstr ""
|
5 |
+
"PO-Revision-Date: 2012-02-26 21:34:50+0000\n"
|
6 |
+
"MIME-Version: 1.0\n"
|
7 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
8 |
+
"Content-Transfer-Encoding: 8bit\n"
|
9 |
+
|
10 |
+
msgid "Calendar"
|
11 |
+
msgstr ""
|
12 |
+
|
13 |
+
msgid "en-US"
|
14 |
+
msgstr ""
|
15 |
+
|
16 |
+
msgid "%1$s by %2$s"
|
17 |
+
msgstr ""
|
18 |
+
|
19 |
+
msgid "New Post"
|
20 |
+
msgstr ""
|
21 |
+
|
22 |
+
msgid " [DRAFT]"
|
23 |
+
msgstr ""
|
24 |
+
|
25 |
+
msgid " [PENDING]"
|
26 |
+
msgstr ""
|
27 |
+
|
28 |
+
msgid " [STICKY]"
|
29 |
+
msgstr ""
|
30 |
+
|
31 |
+
msgid " [DRAFT, STICKY]"
|
32 |
+
msgstr ""
|
33 |
+
|
34 |
+
msgid " [PENDING, STICKY]"
|
35 |
+
msgstr ""
|
36 |
+
|
37 |
+
msgid "Edit"
|
38 |
+
msgstr ""
|
39 |
+
|
40 |
+
msgid "Quick Edit"
|
41 |
+
msgstr ""
|
42 |
+
|
43 |
+
msgid "Delete"
|
44 |
+
msgstr ""
|
45 |
+
|
46 |
+
msgid "View"
|
47 |
+
msgstr ""
|
48 |
+
|
49 |
+
msgid "Status:"
|
50 |
+
msgstr ""
|
51 |
+
|
52 |
+
msgid "Cancel"
|
53 |
+
msgstr ""
|
54 |
+
|
55 |
+
msgid "Title"
|
56 |
+
msgstr ""
|
57 |
+
|
58 |
+
msgid "Content"
|
59 |
+
msgstr ""
|
60 |
+
|
61 |
+
msgid "Add a new post on %s"
|
62 |
+
msgstr ""
|
63 |
+
|
64 |
+
msgid "New %s - "
|
65 |
+
msgstr ""
|
66 |
+
|
67 |
+
msgid "Update"
|
68 |
+
msgstr ""
|
69 |
+
|
70 |
+
msgid "Schedule"
|
71 |
+
msgstr ""
|
72 |
+
|
73 |
+
msgid "Submit for Review"
|
74 |
+
msgstr ""
|
75 |
+
|
76 |
+
msgid "Save"
|
77 |
+
msgstr ""
|
78 |
+
|
79 |
+
msgid "Edit %1$s - %2$s"
|
80 |
+
msgstr ""
|
81 |
+
|
82 |
+
msgid "Scheduled"
|
83 |
+
msgstr ""
|
84 |
+
|
85 |
+
msgid "You are about to delete the post \""
|
86 |
+
msgstr ""
|
87 |
+
|
88 |
+
msgid "\". Press Cancel to stop, OK to delete."
|
89 |
+
msgstr ""
|
90 |
+
|
91 |
+
msgid "Looks like someone else already moved this post."
|
92 |
+
msgstr ""
|
93 |
+
|
94 |
+
msgid "You do not have permission to edit posts."
|
95 |
+
msgstr ""
|
96 |
+
|
97 |
+
msgid "Invalid checksum for post. This is commonly a cross-site scripting error."
|
98 |
+
msgstr ""
|
99 |
+
|
100 |
+
msgid "There was an error contacting your blog."
|
101 |
+
msgstr ""
|
102 |
+
|
103 |
+
msgid "Screen Options"
|
104 |
+
msgstr ""
|
105 |
+
|
106 |
+
msgid "Colors"
|
107 |
+
msgstr ""
|
108 |
+
|
109 |
+
msgid "Drafts: "
|
110 |
+
msgstr ""
|
111 |
+
|
112 |
+
msgid "Apply"
|
113 |
+
msgstr ""
|
114 |
+
|
115 |
+
msgid "Show on screen"
|
116 |
+
msgstr ""
|
117 |
+
|
118 |
+
msgid " weeks at a time"
|
119 |
+
msgstr ""
|
120 |
+
|
121 |
+
msgid "Show in Calendar Cell"
|
122 |
+
msgstr ""
|
123 |
+
|
124 |
+
msgid "Author"
|
125 |
+
msgstr ""
|
126 |
+
|
127 |
+
msgid "Status"
|
128 |
+
msgstr ""
|
129 |
+
|
130 |
+
msgid "Time of day"
|
131 |
+
msgstr ""
|
132 |
+
|
133 |
+
msgid "An error occurred while loading the calendar: "
|
134 |
+
msgstr ""
|
135 |
+
|
136 |
+
msgid "The calendar can only show between 1 and 5 weeks at a time."
|
137 |
+
msgstr ""
|
138 |
+
|
139 |
+
msgid "Select the number of weeks for the calendar to show."
|
140 |
+
msgstr ""
|
141 |
+
|
142 |
+
msgid "<h2>We're done</h2>We've finished collecting data. Thank you for helping us make the calendar better."
|
143 |
+
msgstr ""
|
144 |
+
|
145 |
+
msgid "%1$s Calendar"
|
146 |
+
msgstr ""
|
147 |
+
|
148 |
+
msgid "Jump back"
|
149 |
+
msgstr ""
|
150 |
+
|
151 |
+
msgid "Skip ahead"
|
152 |
+
msgstr ""
|
153 |
+
|
154 |
+
msgid "Scroll the calendar and make the today visible"
|
155 |
+
msgstr ""
|
156 |
+
|
157 |
+
msgid "Show Today"
|
158 |
+
msgstr ""
|
159 |
+
|
160 |
+
msgid "Edit Post"
|
161 |
+
msgstr ""
|
162 |
+
|
163 |
+
msgid "Time"
|
164 |
+
msgstr ""
|
165 |
+
|
166 |
+
msgid "Draft"
|
167 |
+
msgstr ""
|
168 |
+
|
169 |
+
msgid "Pending Review"
|
170 |
+
msgstr ""
|
171 |
+
|
172 |
+
msgid "Posts "
|
173 |
+
msgstr ""
|
174 |
+
|
175 |
+
msgid "Post "
|
176 |
+
msgstr ""
|
177 |
+
|
178 |
+
msgid "Error in deleting..."
|
179 |
+
msgstr ""
|
180 |
+
|
181 |
+
msgid "ltr"
|
182 |
+
msgstr ""
|
lib/languages/{date-fr_FR.js → date-fr-FR.js}
RENAMED
File without changes
|
readme.txt
CHANGED
@@ -2,8 +2,8 @@
|
|
2 |
Contributors: cvernon, justinstresslimit, jkudish, MaryVogt, zgrossbart
|
3 |
Tags: posts, post, calendar, AJAX, admin, administration
|
4 |
Requires at least: 2.8.5
|
5 |
-
Tested up to: 3.3.
|
6 |
-
Stable tag:
|
7 |
|
8 |
The Editorial Calendar makes it possible to see all your posts and drag and drop them to manage your blog.
|
9 |
|
@@ -23,6 +23,7 @@ Try the calendar before you install it. Check out the demo installation at <a h
|
|
23 |
|
24 |
1. See all of your posts and when they'll be posted.
|
25 |
1. Drag and drop to change your post dates.
|
|
|
26 |
1. Quickedit post titles, contents, and times.
|
27 |
1. Publish posts or manage drafts.
|
28 |
1. Easily see the status of your posts.
|
@@ -30,7 +31,11 @@ Try the calendar before you install it. Check out the demo installation at <a h
|
|
30 |
|
31 |
<h4>Make it better</h4>
|
32 |
|
33 |
-
Thank you to everyone who has given us feedback and helped us improve this plugin. If you have questions, problems, or ideas for new features please let us know at <a href="mailto:wp-edcal@googlegroups.com">wp-edcal@googlegroups.com</a>.
|
|
|
|
|
|
|
|
|
34 |
|
35 |
== Installation ==
|
36 |
|
@@ -129,7 +134,7 @@ The editorial calendar works differently based on your permissions.
|
|
129 |
* Contributors see everyone's posts and move their own posts, but can only save drafts.
|
130 |
* Subscribers can't see the calendar.
|
131 |
|
132 |
-
You can see how it looks for different
|
133 |
|
134 |
* edgar the Editor
|
135 |
* alice the Author
|
@@ -164,17 +169,24 @@ Moving published posts can cause problems with some RSS feeds and is generally n
|
|
164 |
4. Create, edit, and schedule posts in one simple quickedit dialog.
|
165 |
5. Show as much or as little of your blog as you like.
|
166 |
6. Use a special calendar for each custom post type on your blog.
|
|
|
167 |
|
168 |
== Changelog ==
|
169 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
170 |
= 1.9.1 =
|
171 |
|
172 |
The calendar is no longer blocking typing in the calendar quick edit dialog.
|
173 |
|
174 |
= 1.9 =
|
175 |
|
176 |
-
We are now filtering out all posts with a status of inherit from the calendar so we don't show additional revisions.
|
177 |
-
|
178 |
The calendar is now translated into Lithuanian. Thanks to Vincent G. from <a href="http://www.host1free.com">host1free.com</a>.
|
179 |
|
180 |
= 1.8.6 =
|
@@ -258,7 +270,7 @@ so we don't overwrite the post without the full post content.
|
|
258 |
* Changed the text of the edit link on published posts from Republish to Edit.
|
259 |
|
260 |
= 1.0 =
|
261 |
-
* Fixed a scrolling issue that prevented
|
262 |
|
263 |
= 0.9 =
|
264 |
* The calendar now uses the QUnit unit test framework to make sure the calendar maintains high quality in every release. You can see the <a href="http://www.zackgrossbart.com/extras/sandbox/wp-admin/edit.php?page=cal&qunit=true">tests run</a> on our integration blog or run them on your own blog by adding &qunit=true to the end of the URL for the calendar.
|
2 |
Contributors: cvernon, justinstresslimit, jkudish, MaryVogt, zgrossbart
|
3 |
Tags: posts, post, calendar, AJAX, admin, administration
|
4 |
Requires at least: 2.8.5
|
5 |
+
Tested up to: 3.3.2
|
6 |
+
Stable tag: 2.0
|
7 |
|
8 |
The Editorial Calendar makes it possible to see all your posts and drag and drop them to manage your blog.
|
9 |
|
23 |
|
24 |
1. See all of your posts and when they'll be posted.
|
25 |
1. Drag and drop to change your post dates.
|
26 |
+
1. Manage your drafts with our new drafts drawer.
|
27 |
1. Quickedit post titles, contents, and times.
|
28 |
1. Publish posts or manage drafts.
|
29 |
1. Easily see the status of your posts.
|
31 |
|
32 |
<h4>Make it better</h4>
|
33 |
|
34 |
+
Thank you to everyone who has given us feedback and helped us improve this plugin. If you have questions, problems, or ideas for new features please let us know at <a href="mailto:wp-edcal@googlegroups.com">wp-edcal@googlegroups.com</a>.
|
35 |
+
|
36 |
+
<h4>Translate it</h4>
|
37 |
+
|
38 |
+
Again, thanks to all who have already helped make the plugin available in so many languages. If you would like to help us translate the plugin into your language, or if you use it in a language other than English already and would like to help us keep it up to date, please write to us at <a href="mailto:wp-edcal@googlegroups.com">wp-edcal@googlegroups.com</a>
|
39 |
|
40 |
== Installation ==
|
41 |
|
134 |
* Contributors see everyone's posts and move their own posts, but can only save drafts.
|
135 |
* Subscribers can't see the calendar.
|
136 |
|
137 |
+
You can see how it looks for different users on our <a href="http://www.zackgrossbart.com/extras/sandbox/wp-admin/edit.php?page=cal">Zack's WordPress Sandbox</a> with the following users:
|
138 |
|
139 |
* edgar the Editor
|
140 |
* alice the Author
|
169 |
4. Create, edit, and schedule posts in one simple quickedit dialog.
|
170 |
5. Show as much or as little of your blog as you like.
|
171 |
6. Use a special calendar for each custom post type on your blog.
|
172 |
+
7. Use the new unscheduled drafts section to manage drafts before you schedule them.
|
173 |
|
174 |
== Changelog ==
|
175 |
|
176 |
+
= 2.0 =
|
177 |
+
|
178 |
+
The calendar now has a new major feature, the "drafts drawer," a post staging area where we make all unscheduled posts available to drag onto the calendar. You can also now drag posts from the calendar back into the drafts drawer to "un-schedule" them.
|
179 |
+
|
180 |
+
Moved around functions in the js and css to be a bit more readable, and added table of contents to css file.
|
181 |
+
|
182 |
+
Updated css of Screen Options to be more core WordPress.
|
183 |
+
|
184 |
= 1.9.1 =
|
185 |
|
186 |
The calendar is no longer blocking typing in the calendar quick edit dialog.
|
187 |
|
188 |
= 1.9 =
|
189 |
|
|
|
|
|
190 |
The calendar is now translated into Lithuanian. Thanks to Vincent G. from <a href="http://www.host1free.com">host1free.com</a>.
|
191 |
|
192 |
= 1.8.6 =
|
270 |
* Changed the text of the edit link on published posts from Republish to Edit.
|
271 |
|
272 |
= 1.0 =
|
273 |
+
* Fixed a scrolling issue that prevented clicking the action links on the last post if the individual day showed a scroll bar.
|
274 |
|
275 |
= 0.9 =
|
276 |
* The calendar now uses the QUnit unit test framework to make sure the calendar maintains high quality in every release. You can see the <a href="http://www.zackgrossbart.com/extras/sandbox/wp-admin/edit.php?page=cal&qunit=true">tests run</a> on our integration blog or run them on your own blog by adding &qunit=true to the end of the URL for the calendar.
|
screenshot-1.png
CHANGED
Binary file
|
screenshot-2.png
CHANGED
Binary file
|
screenshot-3.png
CHANGED
Binary file
|
screenshot-4.png
CHANGED
Binary file
|
screenshot-5.png
CHANGED
Binary file
|
screenshot-6.png
CHANGED
Binary file
|
screenshot-7.png
ADDED
Binary file
|