PluginProbe
WP Ultimate Post Grid / 2.4.0
WP Ultimate Post Grid v2.4.0
4.1.1 trunk 1.5 1.6 1.7 1.7.1 1.7.2 1.8 1.9 2.0 2.1 2.2 2.3 2.4.0 2.5.0 2.6.0 2.7.0 2.8.0 2.8.2 3.0.0 3.3.0 3.4.0 3.5.0 3.6.0 3.7.0 All 32 releases
← All changes | js/admin_form.js +36 -6 2.32.4.0 View file →
@@ -214,15 +214,17 @@
214 214
215 215 // Initial State
216 216 WPUltimatePostGrid.changedType();
217 217 WPUltimatePostGrid.changedPostType();
218 + WPUltimatePostGrid.changedTaxonomy();
218 219 WPUltimatePostGrid.changedOrderBy();
219 220 WPUltimatePostGrid.changedLimitPosts();
221 + WPUltimatePostGrid.changedLimitTerms();
220 222 WPUltimatePostGrid.initRules();
221 223 WPUltimatePostGrid.changedFilterType();
222 224 WPUltimatePostGrid.changedShowCount();
223 225 WPUltimatePostGrid.changedMultiselect();
224 - WPUltimatePostGrid.changedLimitTerms();
226 + WPUltimatePostGrid.changedLimitFilterTerms();
225 227 WPUltimatePostGrid.changedDropdownLabels();
226 228 WPUltimatePostGrid.changedIsotopeFilterStyle();
227 229 WPUltimatePostGrid.changedIsotopeFilterText();
228 230 WPUltimatePostGrid.changedLayoutMode();
@@ -232,10 +234,12 @@
232 234
233 235 // Events
234 236 jQuery('#wpupg_type').on('change', function() { WPUltimatePostGrid.changedType(); });
235 237 jQuery('#wpupg_post_types').on('change', function() { WPUltimatePostGrid.changedPostType(); });
238 + jQuery('#wpupg_taxonomies').on('change', function() { WPUltimatePostGrid.changedTaxonomy(); });
236 239 jQuery('#wpupg_order_by').on('change', function() { WPUltimatePostGrid.changedOrderBy(); });
237 240 jQuery('#wpupg_limit_posts').on('change', function() { WPUltimatePostGrid.changedLimitPosts(); });
241 + jQuery('#wpupg_limit_terms').on('change', function() { WPUltimatePostGrid.changedLimitTerms(); });
238 242 jQuery('#wpupg_add_rule').on('click', function(e) { e.preventDefault(); WPUltimatePostGrid.addRule(); });
239 243 jQuery('.wpupg_rule_delete').on('click', function(e) { e.preventDefault(); WPUltimatePostGrid.removeRule(jQuery(this).parents('tr').attr('data-rule')); });
240 244 jQuery('.wpupg_rule_field').on('change', function(e) { WPUltimatePostGrid.changedRuleField(jQuery(this).parents('tr').attr('data-rule')); });
241 245 jQuery('.rule_container_wpupg_general_date').find('select').on('change', function(e) { WPUltimatePostGrid.changedDateRule(jQuery(this).parents('tr').attr('data-rule')); });
@@ -242,10 +246,10 @@
242 246 jQuery('.wpupg-date').on('change', function(e) { WPUltimatePostGrid.changedDateRule(jQuery(this).parents('tr').attr('data-rule')); });
243 247 jQuery('#wpupg_filter_type').on('change', function() { WPUltimatePostGrid.changedFilterType(); });
244 248 jQuery('#wpupg_filter_count').on('change', function() { WPUltimatePostGrid.changedShowCount(); });
245 249 jQuery('#wpupg_filter_multiselect').on('change', function() { WPUltimatePostGrid.changedMultiselect(); });
246 - jQuery('.wpupg_filter_taxonomy').on('change', function() { WPUltimatePostGrid.changedLimitTerms(); WPUltimatePostGrid.changedDropdownLabels(); });
247 - jQuery('#wpupg_filter_limit').on('change', function() { WPUltimatePostGrid.changedLimitTerms(); });
250 + jQuery('.wpupg_filter_taxonomy').on('change', function() { WPUltimatePostGrid.changedLimitFilterTerms(); WPUltimatePostGrid.changedDropdownLabels(); });
251 + jQuery('#wpupg_filter_limit').on('change', function() { WPUltimatePostGrid.changedLimitFilterTerms(); });
248 252 jQuery('#wpupg_layout_mode').on('change', function() { WPUltimatePostGrid.changedLayoutMode(); });
249 253 jQuery('#wpupg_pagination_type').on('change', function() { WPUltimatePostGrid.changedPaginationType(); });
250 254 jQuery('#wpupg_pagination_load_more_button_text').on('change keyup', function() { WPUltimatePostGrid.changedPaginationText(); });
251 255
@@ -324,18 +328,22 @@
324 328 WPUltimatePostGrid.checkPremiumFeatures('type', true);
325 329 jQuery('#wpupg_meta_box_data_source_terms').show();
326 330
327 331 jQuery('#wpupg_meta_box_data_source').hide();
332 + jQuery('#wpupg_meta_box_limit_terms').show();
328 333 jQuery('#wpupg_meta_box_limit_posts').hide();
329 334 jQuery('#wpupg_meta_box_filter').hide();
330 335 jQuery('#wpupg_meta_box_isotope_filter').hide();
331 336 jQuery('#wpupg_meta_box_pagination').hide();
332 337 jQuery('#wpupg_meta_box_pagination_style').hide();
338 +
339 + WPUltimatePostGrid.changedLimitTerms();
333 340 } else {
334 341 WPUltimatePostGrid.checkPremiumFeatures('type', false);
335 342 jQuery('#wpupg_meta_box_data_source_terms').hide();
336 343
337 344 jQuery('#wpupg_meta_box_data_source').show();
345 + jQuery('#wpupg_meta_box_limit_terms').hide();
338 346 jQuery('#wpupg_meta_box_limit_posts').show();
339 347 jQuery('#wpupg_meta_box_filter').show();
340 348 jQuery('#wpupg_meta_box_isotope_filter').show();
341 349 jQuery('#wpupg_meta_box_pagination').show();
@@ -346,8 +354,15 @@
346 354 WPUltimatePostGrid.changedPaginationType();
347 355 }
348 356 };
349 357
358 +WPUltimatePostGrid.changedTaxonomy = function() {
359 + var taxonomy = jQuery('#wpupg_taxonomies').find(':selected').val();
360 +
361 + jQuery('#wpupg_form_limit_terms').find('tr').hide();
362 + jQuery('#wpupg_form_limit_terms').find('tr#wpupg_form_limit_terms_' + taxonomy).show();
363 +};
364 +
350 365 WPUltimatePostGrid.changedPostType = function() {
351 366 var post_type = jQuery('#wpupg_post_types').find(':selected').val();
352 367
353 368 jQuery('.wpupg_filter_taxonomy_container').hide();
@@ -364,9 +379,9 @@
364 379 WPUltimatePostGrid.filter_possible = false;
365 380 }
366 381
367 382 WPUltimatePostGrid.changedFilterType();
368 - WPUltimatePostGrid.changedLimitTerms();
383 + WPUltimatePostGrid.changedLimitFilterTerms();
369 384 WPUltimatePostGrid.changedDropdownLabels();
370 385 };
371 386
372 387 WPUltimatePostGrid.changedOrderBy = function() {
@@ -380,8 +395,16 @@
380 395 jQuery('.wpupg_order_custom_key_container').hide();
381 396 }
382 397 };
383 398
399 +WPUltimatePostGrid.changedLimitTerms = function() {
400 + if(jQuery('#wpupg_limit_terms').is(':checked')) {
401 + jQuery('#wpupg_meta_box_limit_terms').show();
402 + } else {
403 + jQuery('#wpupg_meta_box_limit_terms').hide();
404 + }
405 +};
406 +
384 407 WPUltimatePostGrid.changedLimitPosts = function() {
385 408 if(jQuery('#wpupg_limit_posts').is(':checked')) {
386 409 WPUltimatePostGrid.checkPremiumFeatures('limit_posts', true);
387 410 jQuery('#wpupg_meta_box_limit_posts').show();
@@ -467,11 +490,13 @@
467 490 };
468 491
469 492 WPUltimatePostGrid.changedFilterType = function() {
470 493 var filter_type = jQuery('#wpupg_filter_type').find(':selected').val();
494 + var filter_type_search = false;
471 495
472 496 if(filter_type.substring(0,5) == 'text_') {
473 497 filter_type = filter_type.substring(5);
498 + filter_type_search = true;
474 499 }
475 500
476 501 // Hide & Show Filter Settings
477 502 if(filter_type == 'none' || filter_type == 'text') {
@@ -488,15 +513,20 @@
488 513 }
489 514
490 515 // Hide & Show Filter Styles
491 516 jQuery('#wpupg_meta_box_isotope_filter').hide();
517 + jQuery('#wpupg_meta_box_text_filter').hide();
492 518 jQuery('#wpupg_meta_box_dropdown_filter').hide();
493 519
494 520 if(WPUltimatePostGrid.filter_possible) {
495 521 jQuery('#wpupg_meta_box_' + filter_type + '_filter').show();
522 +
523 + if(filter_type_search) {
524 + jQuery('#wpupg_meta_box_text_filter').show();
525 + }
496 526 }
497 527
498 - WPUltimatePostGrid.changedLimitTerms();
528 + WPUltimatePostGrid.changedLimitFilterTerms();
499 529 WPUltimatePostGrid.changedDropdownLabels();
500 530 };
501 531
502 532 WPUltimatePostGrid.changedShowCount = function() {
@@ -520,9 +550,9 @@
520 550 jQuery('.wpupg_multiselect').hide();
521 551 }
522 552 };
523 553
524 -WPUltimatePostGrid.changedLimitTerms = function() {
554 +WPUltimatePostGrid.changedLimitFilterTerms = function() {
525 555 var limit_terms = jQuery('#wpupg_filter_limit').is(':checked');
526 556 var post_type = jQuery('#wpupg_post_types').find(':selected').val();
527 557 var taxonomies = jQuery('#wpupg_filter_taxonomy_' + post_type).val();
528 558