PluginProbe
Taskbuilder – Project Management & Task Management Tool With Kanban Board / 6.0.6
Taskbuilder – Project Management & Task Management Tool With Kanban Board v6.0.6
6.0.6 6.0.5 6.0.2 6.0.3 6.0.4 6.0.1 6.0.0 5.0.8 5.0.9 4.0.9 5.0.0 5.0.1 5.0.2 5.0.3 5.0.4 5.0.5 5.0.6 5.0.7 trunk 1.0.0 1.0.1 1.0.2 1.0.3 1.0.4 1.0.5 All 58 releases
← All changes | includes/frontend/wppm_tasks_shortcode.php +39 -3 5.0.76.0.6 View file →
@@ -107,9 +107,9 @@
107 107 ?> wppm_view_task_search_filter();
108 108 <?php }
109 109 }
110 110 if((isset($_REQUEST['task-id'])) && (!empty(sanitize_text_field(wp_unslash($_REQUEST['auth-code'] ))))){ ?>
111 - wppm_open_task(<?php echo esc_js(sanitize_text_field(wp_unslash($_REQUEST['task-id']))); ?>);
111 + wppm_open_task(<?php echo (intval(wp_unslash($_REQUEST['task-id']))); ?>);
112 112 <?php }
113 113 }
114 114 else{ ?>
115 115 wppm_task_sign_in();
@@ -163,12 +163,22 @@
163 163 }
164 164
165 165 function wppm_apply_task_filter(){
166 166 wppm_task_filter = jQuery('#wppm_task_filter').find(":selected").val();
167 + var listFilters = {};
168 + listFilters.created_by = jQuery("#tb-created-by").val();
169 + listFilters.created_by = listFilters.created_by ? listFilters.created_by : [];
170 + listFilters.assigned = jQuery("#tb-assigned").val();
171 + listFilters.assigned = listFilters.assigned ? listFilters.assigned : [];
172 + listFilters.priority = jQuery("#tb-priority").val();
173 + listFilters.priority = listFilters.priority ? listFilters.priority : [];
174 + listFilters.start_date = jQuery("#tb-start-date").val() || "";
175 + listFilters.end_date = jQuery("#tb-end-date").val() || "";
167 176 jQuery('#wppm_task_container').html(wppm_admin.loading_html);
168 177 var dataform=new FormData(jQuery('#wppm_task_list_frm')[0]);
169 178 jQuery(document).trigger('wppm_apply_task_filter_dataform', [dataform]);
170 179 dataform.append("wppm_task_filter", wppm_task_filter);
180 + dataform.append("filters", JSON.stringify(listFilters));
171 181 dataform.append("is_frontend", '1');
172 182 dataform.append("action", 'wppm_get_task_list');
173 183 dataform.append("page",'wppm-tasks');
174 184 <?php if(!empty($this->shortcode_attr['project'])){ ?>
@@ -182,12 +192,22 @@
182 192 contentType: false
183 193 })
184 194 .done(function( response ) {
185 195 jQuery('#wppm_task_container').html(response);
196 + setListFilterCookie(listFilters);
197 + setTimeout(function(){
198 + syncUIWithFilters(listFilters);
199 + renderActiveFilters(listFilters);
200 + }, 100);
186 201 });
187 202 }
188 203
189 204 function wppm_tl_reset_filter(){
205 + // clear advanced filters + cookie BEFORE requesting the list,
206 + // otherwise this request still sends the stale tb_list_filters
207 + // cookie and the reset only takes effect on the next click
208 + resetFilters('list');
209 +
190 210 jQuery('#wppm_task_container').html(wppm_admin.loading_html);
191 211 var dataform=new FormData(jQuery('#wppm_task_list_frm')[0]);
192 212 dataform.append("action", 'wppm_get_task_list');
193 213 dataform.append("wppm_task_filter", 'all');
@@ -206,9 +226,9 @@
206 226 type: 'POST',
207 227 data: dataform,
208 228 processData: false,
209 229 contentType: false
210 - })
230 + })
211 231 .done(function( response ) {
212 232 jQuery('#wppm_task_container').html(response);
213 233 });
214 234 }
@@ -338,8 +358,23 @@
338 358 });
339 359 }
340 360
341 361 function wppm_tl_reset_grid_view_filter(){
362 + // clear advanced filters + cookie BEFORE requesting the list,
363 + // otherwise this request still sends the stale tb_filters cookie
364 + // and the advanced filters never actually get reset
365 + jQuery("#tb-created-by").val(null).trigger("change");
366 + jQuery("#tb-assigned").val(null).trigger("change");
367 + jQuery("#tb-priority").val(null).trigger("change");
368 + jQuery("#tb-start-date").val("");
369 + jQuery("#tb-end-date").val("");
370 + jQuery("#tb-advanced-panel").removeClass("tb-open");
371 + jQuery("#tb-backdrop").removeClass("active");
372 + jQuery("#tb-active-filters").html('');
373 + window.filters = { created_by: [], assigned: [], priority: [], start_date: "", end_date: "" };
374 + document.cookie = "tb_filters=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;";
375 + window.localStorage.removeItem('wppm_task_filter');
376 +
342 377 jQuery('#wppm_task_container').html(wppm_admin.loading_html);
343 378 var dataform=new FormData(jQuery('#wppm_view_project_task')[0]);
344 379 jQuery(document).trigger('wppm_tl_reset_grid_view_filter_dataform', [dataform]);
345 380 dataform.append("action", 'wppm_view_project_tasks');
@@ -358,13 +393,14 @@
358 393 type: 'POST',
359 394 data: dataform,
360 395 processData: false,
361 396 contentType: false
362 - })
397 + })
363 398 .done(function( response ) {
364 399 jQuery('#wppm_task_container').html(response);
365 400 });
366 401 }
402 +
367 403 function wppm_tasks_by_select_project(){
368 404 wppm_proj_filter = jQuery('#wppm_task_list_proj_filter').find(":selected").val();
369 405 jQuery('#wppm_task_container').html(wppm_admin.loading_html);
370 406 var dataform=new FormData(jQuery('#wppm_task_list_frm')[0]);