PluginProbe
WP Ultimate Post Grid / 2.0
WP Ultimate Post Grid v2.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 +8 -58 2.4.02.0 View file →
@@ -214,17 +214,14 @@
214 214
215 215 // Initial State
216 216 WPUltimatePostGrid.changedType();
217 217 WPUltimatePostGrid.changedPostType();
218 - WPUltimatePostGrid.changedTaxonomy();
219 218 WPUltimatePostGrid.changedOrderBy();
220 219 WPUltimatePostGrid.changedLimitPosts();
221 - WPUltimatePostGrid.changedLimitTerms();
222 220 WPUltimatePostGrid.initRules();
223 221 WPUltimatePostGrid.changedFilterType();
224 - WPUltimatePostGrid.changedShowCount();
225 222 WPUltimatePostGrid.changedMultiselect();
226 - WPUltimatePostGrid.changedLimitFilterTerms();
223 + WPUltimatePostGrid.changedLimitTerms();
227 224 WPUltimatePostGrid.changedDropdownLabels();
228 225 WPUltimatePostGrid.changedIsotopeFilterStyle();
229 226 WPUltimatePostGrid.changedIsotopeFilterText();
230 227 WPUltimatePostGrid.changedLayoutMode();
@@ -234,12 +231,10 @@
234 231
235 232 // Events
236 233 jQuery('#wpupg_type').on('change', function() { WPUltimatePostGrid.changedType(); });
237 234 jQuery('#wpupg_post_types').on('change', function() { WPUltimatePostGrid.changedPostType(); });
238 - jQuery('#wpupg_taxonomies').on('change', function() { WPUltimatePostGrid.changedTaxonomy(); });
239 235 jQuery('#wpupg_order_by').on('change', function() { WPUltimatePostGrid.changedOrderBy(); });
240 236 jQuery('#wpupg_limit_posts').on('change', function() { WPUltimatePostGrid.changedLimitPosts(); });
241 - jQuery('#wpupg_limit_terms').on('change', function() { WPUltimatePostGrid.changedLimitTerms(); });
242 237 jQuery('#wpupg_add_rule').on('click', function(e) { e.preventDefault(); WPUltimatePostGrid.addRule(); });
243 238 jQuery('.wpupg_rule_delete').on('click', function(e) { e.preventDefault(); WPUltimatePostGrid.removeRule(jQuery(this).parents('tr').attr('data-rule')); });
244 239 jQuery('.wpupg_rule_field').on('change', function(e) { WPUltimatePostGrid.changedRuleField(jQuery(this).parents('tr').attr('data-rule')); });
245 240 jQuery('.rule_container_wpupg_general_date').find('select').on('change', function(e) { WPUltimatePostGrid.changedDateRule(jQuery(this).parents('tr').attr('data-rule')); });
@@ -244,12 +239,11 @@
244 239 jQuery('.wpupg_rule_field').on('change', function(e) { WPUltimatePostGrid.changedRuleField(jQuery(this).parents('tr').attr('data-rule')); });
245 240 jQuery('.rule_container_wpupg_general_date').find('select').on('change', function(e) { WPUltimatePostGrid.changedDateRule(jQuery(this).parents('tr').attr('data-rule')); });
246 241 jQuery('.wpupg-date').on('change', function(e) { WPUltimatePostGrid.changedDateRule(jQuery(this).parents('tr').attr('data-rule')); });
247 242 jQuery('#wpupg_filter_type').on('change', function() { WPUltimatePostGrid.changedFilterType(); });
248 - jQuery('#wpupg_filter_count').on('change', function() { WPUltimatePostGrid.changedShowCount(); });
249 243 jQuery('#wpupg_filter_multiselect').on('change', function() { WPUltimatePostGrid.changedMultiselect(); });
250 - jQuery('.wpupg_filter_taxonomy').on('change', function() { WPUltimatePostGrid.changedLimitFilterTerms(); WPUltimatePostGrid.changedDropdownLabels(); });
251 - jQuery('#wpupg_filter_limit').on('change', function() { WPUltimatePostGrid.changedLimitFilterTerms(); });
244 + jQuery('.wpupg_filter_taxonomy').on('change', function() { WPUltimatePostGrid.changedLimitTerms(); WPUltimatePostGrid.changedDropdownLabels(); });
245 + jQuery('#wpupg_filter_limit').on('change', function() { WPUltimatePostGrid.changedLimitTerms(); });
252 246 jQuery('#wpupg_layout_mode').on('change', function() { WPUltimatePostGrid.changedLayoutMode(); });
253 247 jQuery('#wpupg_pagination_type').on('change', function() { WPUltimatePostGrid.changedPaginationType(); });
254 248 jQuery('#wpupg_pagination_load_more_button_text').on('change keyup', function() { WPUltimatePostGrid.changedPaginationText(); });
255 249
@@ -328,22 +322,18 @@
328 322 WPUltimatePostGrid.checkPremiumFeatures('type', true);
329 323 jQuery('#wpupg_meta_box_data_source_terms').show();
330 324
331 325 jQuery('#wpupg_meta_box_data_source').hide();
332 - jQuery('#wpupg_meta_box_limit_terms').show();
333 326 jQuery('#wpupg_meta_box_limit_posts').hide();
334 327 jQuery('#wpupg_meta_box_filter').hide();
335 328 jQuery('#wpupg_meta_box_isotope_filter').hide();
336 329 jQuery('#wpupg_meta_box_pagination').hide();
337 330 jQuery('#wpupg_meta_box_pagination_style').hide();
338 -
339 - WPUltimatePostGrid.changedLimitTerms();
340 331 } else {
341 332 WPUltimatePostGrid.checkPremiumFeatures('type', false);
342 333 jQuery('#wpupg_meta_box_data_source_terms').hide();
343 334
344 335 jQuery('#wpupg_meta_box_data_source').show();
345 - jQuery('#wpupg_meta_box_limit_terms').hide();
346 336 jQuery('#wpupg_meta_box_limit_posts').show();
347 337 jQuery('#wpupg_meta_box_filter').show();
348 338 jQuery('#wpupg_meta_box_isotope_filter').show();
349 339 jQuery('#wpupg_meta_box_pagination').show();
@@ -354,15 +344,8 @@
354 344 WPUltimatePostGrid.changedPaginationType();
355 345 }
356 346 };
357 347
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 -
365 348 WPUltimatePostGrid.changedPostType = function() {
366 349 var post_type = jQuery('#wpupg_post_types').find(':selected').val();
367 350
368 351 jQuery('.wpupg_filter_taxonomy_container').hide();
@@ -379,9 +362,9 @@
379 362 WPUltimatePostGrid.filter_possible = false;
380 363 }
381 364
382 365 WPUltimatePostGrid.changedFilterType();
383 - WPUltimatePostGrid.changedLimitFilterTerms();
366 + WPUltimatePostGrid.changedLimitTerms();
384 367 WPUltimatePostGrid.changedDropdownLabels();
385 368 };
386 369
387 370 WPUltimatePostGrid.changedOrderBy = function() {
@@ -395,16 +378,8 @@
395 378 jQuery('.wpupg_order_custom_key_container').hide();
396 379 }
397 380 };
398 381
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 -
407 382 WPUltimatePostGrid.changedLimitPosts = function() {
408 383 if(jQuery('#wpupg_limit_posts').is(':checked')) {
409 384 WPUltimatePostGrid.checkPremiumFeatures('limit_posts', true);
410 385 jQuery('#wpupg_meta_box_limit_posts').show();
@@ -490,17 +465,11 @@
490 465 };
491 466
492 467 WPUltimatePostGrid.changedFilterType = function() {
493 468 var filter_type = jQuery('#wpupg_filter_type').find(':selected').val();
494 - var filter_type_search = false;
495 469
496 - if(filter_type.substring(0,5) == 'text_') {
497 - filter_type = filter_type.substring(5);
498 - filter_type_search = true;
499 - }
500 -
501 470 // Hide & Show Filter Settings
502 - if(filter_type == 'none' || filter_type == 'text') {
471 + if(filter_type == 'none') {
503 472 jQuery('#wpupg_form_filter').find('tr').not('.wpupg_no_filter').hide();
504 473 } else {
505 474 jQuery('#wpupg_form_filter').find('tr').not('.wpupg_no_filter').show();
506 475 }
@@ -505,9 +474,9 @@
505 474 jQuery('#wpupg_form_filter').find('tr').not('.wpupg_no_filter').show();
506 475 }
507 476
508 477 // Premium only filters
509 - if(filter_type == 'dropdown' || filter_type == 'text') {
478 + if(filter_type == 'dropdown') {
510 479 WPUltimatePostGrid.checkPremiumFeatures('filter_type', true);
511 480 } else {
512 481 WPUltimatePostGrid.checkPremiumFeatures('filter_type', false);
513 482 }
@@ -513,33 +482,18 @@
513 482 }
514 483
515 484 // Hide & Show Filter Styles
516 485 jQuery('#wpupg_meta_box_isotope_filter').hide();
517 - jQuery('#wpupg_meta_box_text_filter').hide();
518 486 jQuery('#wpupg_meta_box_dropdown_filter').hide();
519 487
520 488 if(WPUltimatePostGrid.filter_possible) {
521 489 jQuery('#wpupg_meta_box_' + filter_type + '_filter').show();
522 -
523 - if(filter_type_search) {
524 - jQuery('#wpupg_meta_box_text_filter').show();
525 - }
526 490 }
527 491
528 - WPUltimatePostGrid.changedLimitFilterTerms();
492 + WPUltimatePostGrid.changedLimitTerms();
529 493 WPUltimatePostGrid.changedDropdownLabels();
530 494 };
531 495
532 -WPUltimatePostGrid.changedShowCount = function() {
533 - var show_count = jQuery('#wpupg_filter_count').is(':checked');
534 -
535 - if(show_count) {
536 - WPUltimatePostGrid.checkPremiumFeatures('show_count', true);
537 - } else {
538 - WPUltimatePostGrid.checkPremiumFeatures('show_count', false);
539 - }
540 -};
541 -
542 496 WPUltimatePostGrid.changedMultiselect = function() {
543 497 var multiselect = jQuery('#wpupg_filter_multiselect').is(':checked');
544 498
545 499 if(multiselect) {
@@ -550,9 +504,9 @@
550 504 jQuery('.wpupg_multiselect').hide();
551 505 }
552 506 };
553 507
554 -WPUltimatePostGrid.changedLimitFilterTerms = function() {
508 +WPUltimatePostGrid.changedLimitTerms = function() {
555 509 var limit_terms = jQuery('#wpupg_filter_limit').is(':checked');
556 510 var post_type = jQuery('#wpupg_post_types').find(':selected').val();
557 511 var taxonomies = jQuery('#wpupg_filter_taxonomy_' + post_type).val();
558 512
@@ -575,12 +529,8 @@
575 529 WPUltimatePostGrid.changedDropdownLabels = function() {
576 530 var filter_type = jQuery('#wpupg_filter_type').find(':selected').val();
577 531 var post_type = jQuery('#wpupg_post_types').find(':selected').val();
578 532 var taxonomies = jQuery('#wpupg_filter_taxonomy_' + post_type).val();
579 -
580 - if(filter_type.substring(0,5) == 'text_') {
581 - filter_type = filter_type.substring(5);
582 - }
583 533
584 534 if( !jQuery.isArray( taxonomies ) ) {
585 535 taxonomies = [taxonomies];
586 536 }